Skip to content

Format the two files main is failing its own pre-commit hook on - #11203

Merged
danielhanchen merged 1 commit into
mainfrom
fix/formatter-drift-on-main
Sep 17, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/formatter-drift-on-main

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

pre-commit.ci runs --all-files against each PR merged into main, so a file that drifts out of format on main fails the ruff-format-with-kwargs hook on every open PR, not on the PR that touched it.

Two files are currently in that state on main:

tests/studio/install/test_dependency_pass_skips.py | 4 +---
tests/studio/install/test_mlx_install.py           | 8 ++------

Verified by running the hook's own file set (its exclude regex applied) against pristine origin/main: exactly these two come back modified, with a diff identical to the one seen when the same set is run against a PR merged into main. So the failure follows main, not the PR.

The change is whitespace only, three multi-line calls joined into one line each. The kwarg = value spacing that the hook exists to preserve is untouched.

Ran with the hook's pinned formatter, ruff==0.6.9 from the hook's additional_dependencies, not the v0.15.18 that the separate lint hook uses. scripts/run_ruff_format.py refuses to run under the wrong one, which is how the two versions stay distinguishable.

tests/studio/install/test_dependency_pass_skips.py and tests/studio/install/test_mlx_install.py: 228 passed.

pre-commit.ci runs --all-files against each PR merged into main, so these two
files fail the ruff-format-with-kwargs hook on every open PR rather than on the
PR that touches them. Neither is touched by any PR I have open; the diff is
three multi-line calls joined, whitespace only, and the kwarg spacing the hook
exists to preserve is unchanged.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-17T13:05:20.054545Z 06f6e75 PR opened
🔒 Security Review ✅ Completed 2026-09-17T13:06:49.445436Z 06f6e75 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen
danielhanchen merged commit c2d66e8 into main Sep 17, 2026
0 of 23 checks passed
@danielhanchen
danielhanchen deleted the fix/formatter-drift-on-main branch September 17, 2026 13:06
rhsCZ pushed a commit to rhsCZ/unsloth that referenced this pull request Sep 17, 2026
Picks up the formatter fix from unslothai#11203, which is what pre-commit.ci was failing
on: it runs --all-files against the PR merged into main, so two files that had
drifted out of format on main failed the hook on every open PR rather than on the
PR that touched them.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…othai#11203)

pre-commit.ci runs --all-files against each PR merged into main, so these two
files fail the ruff-format-with-kwargs hook on every open PR rather than on the
PR that touches them. Neither is touched by any PR I have open; the diff is
three multi-line calls joined, whitespace only, and the kwarg spacing the hook
exists to preserve is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant