Medium
Python
Use Black and Ruff for formatting/linting
Official
Rule Description
Use Black for formatting and Ruff for linting:
- Black: Uncompromising code formatter (no configuration debates)
- Ruff: Extremely fast linter (replaces flake8, isort, pylint)
```toml
# pyproject.toml
[tool.black]
line-length = 88
[tool.ruff]
line-length = 88
select = ["E", "F", "I", "N", "W", "UP"]
```
Run both in CI and pre-commit hooks.
Add This Rule
Sign in to add this rule to your workspace
Sign in with GitHubDetails
- Severity
- Medium
- Category
- Python
- Used in
- 6 rulesets