-
-
Notifications
You must be signed in to change notification settings - Fork 1
chore: enforce Black formatting in pre-commit and CI to prevent drift #3408
Copy link
Copy link
Open
Labels
Description
Summary
89 Python files drifted from Black formatting standards and were discovered via CI check (2026-04-03). The files were reformatted manually in commit `76ac6c7e8`. Without enforcement, this will recur.
Discovery
Found during routine session — Black `--check` on `autobot-backend/` and `autobot-slm-backend/` reported 89 files needing reformat. No pre-commit hook was preventing the drift.
Proposed Fix
- Verify `.pre-commit-config.yaml` includes Black with auto-format on staged files
- Ensure all developers run `pre-commit install` after cloning
- Confirm CI pipeline runs `black --check` as a blocking step
- Consider adding `isort --profile black` check alongside Black
Acceptance Criteria
- Pre-commit hook runs Black on staged `.py` files before every commit
- CI `black --check` step is present and blocking
- No files fail `black --check` after changes are applied
Reactions are currently unavailable