Black vs Ruff
In 1,621 Python projects set up for AI coding agents, Black is a dependency in 78 (4.8%) and Ruff in 54 (3.3%): Black is 1.4× as common. 19 projects list both, often a sign of a migration or of a monorepo with several apps.
Linting and formatting PyPI Updated Nov 17, 2026
Side by side
| Black | Ruff | |
|---|---|---|
| Agent projects that use it | 78 | 54 |
| Rank in linting and formatting | #10 | #16 |
| In new repos with a linting and formatting tool (last 90 days) | — | — |
| In older repos with one | 46.6% | 30.1% |
| Downloads, last 7 days | 25.3M | 103M |
| GitHub stars | 42.2K | 51.3K |
| Last push to its repo | Nov 16, 2026 | Nov 17, 2026 |
| License | MIT | MIT |
| Funding | — | — |
| Projects that list both | 19 | |
Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from PyPI.
By coding agent
| Projects set up for | Python repos | Black | Ruff |
|---|---|---|---|
| Claude Code | 782 | 4.6% | 4.3% |
| GitHub Copilot | 805 | 5.0% | 3.9% |
| Cursor | 548 | 4.2% | 4.0% |
| Gemini CLI | 83 | 0% | 7.2% |
| Devin Desktop | 60 | 11.7% | 8.3% |
Share of the Python repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.
Black
Uncompromising Python code formatter enforcing consistent style automatically.
Most often used with it:
| pytest | 89.7% of its projects |
|---|---|
| python-dotenv | 66.7% of its projects |
| Requests | 56.4% of its projects |
| Uvicorn | 55.1% of its projects |
| flake8 | 55.1% of its projects |
pip install black
Ruff
Extremely fast Python linter and code formatter written in Rust for modern projects.
Most often used with it:
| pytest | 81.5% of its projects |
|---|---|
| Pydantic | 70.4% of its projects |
| Uvicorn | 59.3% of its projects |
| python-dotenv | 53.7% of its projects |
| FastAPI | 51.9% of its projects |
pip install ruff
More matchups
How we count
Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.