Skip to content

Fix ruff import sorting + activate pre-commit hook#2

Merged
Ho1yShif merged 1 commit into
mainfrom
fix/ruff-import-sort-precommit
Jul 13, 2026
Merged

Fix ruff import sorting + activate pre-commit hook#2
Ho1yShif merged 1 commit into
mainfrom
fix/ruff-import-sort-precommit

Conversation

@Ho1yShif

Copy link
Copy Markdown
Collaborator

What

  • Sort imports in 3 files to satisfy ruff I001 (force-sort-within-sections) — the CI failure in run 29222908650.
  • Apply ruff format to tests/api/test_settings_router_secrets.py (two multi-line signatures collapse within the 100-char limit).
  • Remove --exit-zero from the ruff pre-commit hook so unfixable lint errors block commits locally, mirroring CI's strict ruff check ..

Root cause

.pre-commit-config.yaml existed and already included ruff, but the git hook was never installed (pre-commit install), so lint-dirty commits reached CI unchecked. The formatting issue was latent: CI stops at the failing ruff check step before it reaches the separate ruff format --check step.

Note for contributors

pre-commit install is per-clone and not tracked by git — each contributor must run it once after cloning for the hook to be active. Worth adding to the README/CONTRIBUTING as a follow-up.

🤖 Generated with Claude Code

Sort imports in three files to satisfy ruff's I001 (force-sort-within-sections),
which was failing CI, and apply ruff format to a test file whose multi-line
signatures fit within the 100-char limit.

Also remove --exit-zero from the ruff pre-commit hook so unfixable lint errors
block the commit locally, mirroring CI's strict `ruff check .`.

Root cause: the pre-commit config existed but the git hook was never installed
(`pre-commit install`), so lint-dirty commits reached CI unchecked. The format
issue was latent because CI stops at the failing `ruff check` step before
reaching `ruff format --check`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Ho1yShif Ho1yShif merged commit 0a5f4c6 into main Jul 13, 2026
9 of 11 checks passed
@Ho1yShif Ho1yShif deleted the fix/ruff-import-sort-precommit branch July 13, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant