Repository navigation
Studio: put the sidebar nav validator signature on the line the formatter wants - #11374
Merged
Merged
Conversation
…tter wants The sidebarNavAuto validator landed with its signature wrapped across three lines. It fits in one at the configured line length of 100, so the ruff-format-with-kwargs hook rewrites it on every run, reports "files were modified by this hook" and fails. That is why pre-commit.ci has been red on main since #11370, and why every open pull request inherits a red check it did nothing to cause. On a fork-hosted branch the bot cannot push its own fix either, so the failure just sits there. Running the hook after this change leaves the tree untouched.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…tter wants (unslothai#11374) The sidebarNavAuto validator landed with its signature wrapped across three lines. It fits in one at the configured line length of 100, so the ruff-format-with-kwargs hook rewrites it on every run, reports "files were modified by this hook" and fails. That is why pre-commit.ci has been red on main since unslothai#11370, and why every open pull request inherits a red check it did nothing to cause. On a fork-hosted branch the bot cannot push its own fix either, so the failure just sits there. Running the hook after this change leaves the tree untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is wrong
pre-commit.cihas been failing onmainsince #11370, and every open pull request inherits the red check.The failing hook is
ruff-format-with-kwargs, and it fails withfiles were modified by this hook. The log's1287 files reformatted, 81 files left unchangedis ruff's own summary from inside the script, not the verdict:scripts/run_ruff_format.pyrunsruff formatand then restores the kwarg spacing, so almost all of those come back byte for byte. Exactly one file does not.sidebarNavAuto's validator landed with its signature wrapped across three lines:On one line it is 91 characters, inside the configured
line-length = 100, so the formatter unwraps it on every run, the tree comes back modified and the hook fails. On a fork-hosted branchpre-commit.cicannot push its own fix either, so the failure has nowhere to go.The fix
Put the signature on one line, which is what the hook produces.
How this was confirmed
Reproduced with the same environment the runner uses, which the run log names as
[email protected]andlocal:ruff==0.6.9. The Python version matters here: under 3.11 the script moves 53 files and the real defect is buried in the noise, under 3.14 it moves exactly one.mainatad16046cstudio/backend/routes/settings.pyRe-running the hook after the change leaves
settings.pybyte identical (same sha256 before and after), so it is a fixed point rather than merely quieter.ruff checkon the file passes and it parses.The first red commit on
mainis63c63415a, andgit log -S _validate_sidebar_nav_autonames that same commit as the one that introduced the signature, so cause and symptom agree.