| 1 | # Python tooling configuration for SquadScope. |
| 2 | # |
| 3 | # Ruff is introduced in warning-only (Phase A) mode — see issue #540 and the |
| 4 | # DevSecOps Guardrails epic (jmservera/SquadScope-Coordinator#33). The CI job is |
| 5 | # non-blocking for now; violations are reported as annotations only and are not |
| 6 | # fixed yet (Phase B) nor enforced (Phase C). |
| 7 | |
| 8 | [tool.ruff] |
| 9 | line-length = 100 |
| 10 | target-version = "py312" |
| 11 | |
| 12 | # Keep generated, vendored and archived code out of the baseline. |
| 13 | extend-exclude = [ |
| 14 | ".venv", |
| 15 | "venv", |
| 16 | "node_modules", |
| 17 | "public", |
| 18 | "resources", |
| 19 | "themes", |
| 20 | "scripts/archived", |
| 21 | ".worktrees", |
| 22 | ] |
| 23 | |
| 24 | [tool.ruff.lint] |
| 25 | # Conservative Phase-A rule subset: pycodestyle errors (E), Pyflakes (F), |
| 26 | # and import sorting (I). Broaden in later phases. |
| 27 | select = ["E", "F", "I"] |
| 28 | |
| 29 | # Line length is owned by the formatter (`ruff format`), enforced in CI via |
| 30 | # `ruff format --check`. E501 only fires on content the formatter intentionally |
| 31 | # leaves untouched — long URLs and prose inside triple-quoted string templates |
| 32 | # and test fixtures, which cannot be wrapped without changing program output. |
| 33 | # Following the standard Black/Ruff convention, we disable the lint-side E501 |
| 34 | # check while keeping formatter-enforced wrapping for code. |
| 35 | ignore = ["E501"] |