Reviewed 6 September 2026

Part II: Practices

Linting and formatting

ruff provides both a linter and a formatter in a single binary, implementing rules from flake8 and its plugins, isort, pydocstyle, pyupgrade, bandit and others. The formatter is compatible with Black’s style with minor documented deviations.

[tool.ruff]
line-length = 100
target-version = "py314"

[tool.ruff.lint]
select = ["E", "F", "I", "N", "UP", "B", "SIM", "C4", "PTH", "RUF"]
ignore = []

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]

Common rule sets: E/F (pycodestyle, Pyflakes), I (import sorting), UP (pyupgrade), B (bugbear), SIM (simplification), PTH (pathlib over os.path), S (security), D (docstrings), ANN (annotation coverage).

Two commands cover both roles:

uv run ruff check --fix
uv run ruff format