Skip to content

Configuration

python-checkup is zero-config by default. All settings are optional and go in your pyproject.toml.

Full Reference

[tool.python-checkup]
timeout = 60  # Per-analyzer timeout in seconds

[tool.python-checkup.weights]
quality = 25       # Ruff lint rules
types = 20         # mypy type checking
security = 20      # Bandit + detect-secrets
complexity = 15    # Radon cyclomatic complexity + MI
dead_code = 10     # Vulture unused code
dependencies = 10  # pip-audit + deptry

[tool.python-checkup.thresholds]
healthy = 75     # Score >= 75 is "Healthy"
needs_work = 50  # Score >= 50 is "Needs work", below is "Critical"

[tool.python-checkup.ignore]
rules = ["S101", "C901"]   # Suppress specific rule IDs
files = ["tests/**", "migrations/**"]  # Exclude file patterns

Weights

Weights control how much each category contributes to the overall score. They must sum to 100. When a category has no data (e.g., mypy is not installed), its weight is redistributed proportionally to the remaining categories.

Default weights

Category Weight Tools
Quality 25 Ruff
Type Safety 20 mypy
Security 20 Bandit, detect-secrets
Complexity 15 Radon
Dead Code 10 Vulture
Dependencies 10 OSV scanning, deptry

Thresholds

Thresholds determine the label assigned to the overall score:

Score Range Label
>= healthy Healthy
>= needs_work Needs work
< needs_work Critical

Ignoring Rules

[tool.python-checkup.ignore]
rules = ["S101"]  # Ignore assert usage warnings

Rule IDs follow each tool's convention: E501 (Ruff), B301 (Bandit), S101 (Ruff security), C901 (complexity), mypy-return-value (mypy).

Ignoring Files

[tool.python-checkup.ignore]
files = ["tests/**", "docs/**", "**/migrations/**"]

File patterns use glob syntax relative to the project root.