Skip to content

chore: enforce Black formatting in pre-commit and CI to prevent drift #3408

Closed

Description

@mrveiss

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

  1. Verify `.pre-commit-config.yaml` includes Black with auto-format on staged files
  2. Ensure all developers run `pre-commit install` after cloning
  3. Confirm CI pipeline runs `black --check` as a blocking step
  4. 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

Activity

  1. github-actions commented on Apr 3, 2026

    @github-actions
    Contributor

    PR #3409 (merged to Dev_new_gui) references this issue with a close keyword.

    style: apply Black formatting to 89 Python files (#3408)

    If this issue is fully resolved, close it manually. If work remains, no action is needed.

  2. mrveiss commented on Apr 6, 2026

    @mrveiss
    OwnerAuthor

    Fixed in PR #3571 (merged).

  3. mrveiss commented on Apr 7, 2026

    @mrveiss
    OwnerAuthor

    Fixed and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions