[AAASM-4915] 🔧 (config): Consolidate python-sdk formatter on ruff#285
Conversation
Consolidate the python-sdk formatter/import tooling onto a single ruff-pre-commit block: ruff-check --fix (isort I + autoflake F401/F841) plus ruff-format (black-compatible). ruff.toml is the source of truth. Also exclude quickstart_snippets/ in ruff.toml to preserve the parity the replaced trio had via the pre-commit top-level exclude — the dir holds vendored, verbatim doc excerpts that ruff cannot lint/format. Refs AAASM-4915 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apply ruff format across the tree after switching the formatter from black. Diff is minimal and black-equivalent: 6 files, 14 insertions / 15 deletions — only ruff's implicit-string-concat joining and assert-message parenthesization differ from black's output. Refs AAASM-4915 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the contributor/adapter docs and repo CLAUDE.md to name ruff format (and the new ruff check + ruff format pre-commit suite) now that black/isort/autoflake are gone. Refs AAASM-4915 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude Code review — merge-readinessVerdict: ready to merge, pending required Pioneer approval. No blocking issues found. (This is an automated review — not an approval.) CIAll 19 checks green — CI ( Codecov / SonarCloudBoth green — no blocking quality-gate or coverage findings on the PR. Scope vs AAASM-4915 — all acceptance criteria met
Side-effect check — no behavior change
One advisory (non-blocking)Master had no ruff hook in pre-commit at all (lint was black+isort+autoflake there; — Claude Code (automated review) |



Description
Consolidate the python-sdk's Python formatting/import tooling from three
separate pre-commit hooks (black + isort + autoflake) onto a single
ruff setup, so the SDK has one Python formatter that is already its linter.
.pre-commit-config.yaml: removed theisort,autoflake, andblackhooks; added the
astral-sh/ruff-pre-commitblock (ruff-check --fix+ruff-format) pinned tov0.15.21(matching theruff>=0.15.21dev dep).ruff-check --fixfolds in isort (ruleI) and autoflake's unused-import/varremoval (
F401/F841);ruff-formatis black-compatible.ruff.tomlalready enabledI,F(incl.F401/F841), and a[format]section, so no lint-policy change was needed. Added
quickstart_snippets/toruff's
excludeto preserve the parity the removed trio had via thepre-commit top-level
exclude— that dir holds vendored, verbatim quick-startexcerpts (regenerated into docs by
quickstart-tabs-check) that are partialgovernance slices ruff cannot lint/format.
ruff format:.claude/CLAUDE.md,CONTRIBUTING.md,docs/guides/authoring-adapters.md.Reformat diff size — black-equivalent: running
ruff format .across thetree touched only 6 files, +14 / -15 lines. Every change is a known,
cosmetic black↔ruff-format micro-difference — ruff joins implicit
string-concatenations that fit on one line, and prefers the parenthesized
assert cond, (msg)form. No structural reformatting. (quickstart_snippets/was intentionally left untouched to keep the vendored copies verbatim.)
Commits are split: config change · reformat · docs — the reformat is its own
commit so reviewers can confirm no surprise formatting.
Type of Change
Breaking Changes
Related Issues
Testing
Gates run in the worktree (native
_coreshim intentionally not built):ruff format --check .— cleanruff check .— clean (All checks passed!)mypy agent_assembly(as configured,--ignore-missing-imports) —Success: no issues found in 73 source filespytest test/ -q— 1195 passed, 16 skippedpre-commit run --all-files— passes end-to-end (proves black/isort/autoflake are gone and ruff-check/ruff-format run)Checklist