Medium Python

Use Black and Ruff for formatting/linting

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.

Included in Rulesets

Django Best Practices
36 rules • 1 standard
View
FastAPI Guidelines
36 rules • 1 standard
View
Python Standards
33 rules • 2 standards
View
Black Standards
22 rules • 0 standards
View
Pylint Standards
22 rules • 0 standards
View
Code Review Standards
58 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
Medium
Category
Python
Used in
6 rulesets