Skip to content

Adopt ruff format for the hub's Python trees and gate it in CI #707

Description

@ptr727

Follow-up to #700 / #704, by maintainer direction: the hub's Python is formatted the way a Python project's is, and a change to .py code lands formatted.

Evidence, measured on the #704 branch

uvx ruff@latest format --check scripts spec host-setup reports 19 of 30 files would be reformatted, a diff of roughly 12,000 lines. That reformat was deliberately kept out of #704 so the lint, CI, and layout changes stayed reviewable, and this issue is the recorded decision to take it rather than leave format drift ungated.

What lands

  1. The one-time reformat: uvx ruff@latest format across scripts/, spec/, and host-setup/, in its own commit carrying no behavior change, so the diff reviews as format-only.
  2. The CI gate: a uvx ruff@latest format --check . step in validate-task.yml beside the existing ruff check step, at the same unpinned-latest contract.
  3. The runbook: the same invocation joins OPERATIONS.md "Run the gates the way CI runs them".
  4. The law: the python-codestyle skill's Scripts profile names ruff format in its CI tooling sentence, so the profile's clean-compile matches the build profile's (format + check + type checker) and carries fleet-wide. Regenerate the plugin with it.

Sequencing

Immediately after #704 merges, since both edit validate-task.yml, the OPERATIONS.md runbook block, and the python-codestyle skill, and rebasing the reformat under #704's rename of scripts/test_*.py to scripts/tests/ is churn nobody needs.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions