Repository navigation
Format the superseded-runs guard the way the hook does - #11348
Merged
Merged
Conversation
#11345 landed tests/studio/test_pull_requests_cancel_superseded_runs.py with one assert the ruff-format-with-kwargs hook rewrites, so main is not a fixed point of its own formatter. That fails tests/test_formatter_fixed_point.py, which is in the "Repo tests (CPU, rest)" shard, and it fails pre-commit.ci on every pull request, since pre-commit.ci runs the hook over all files and reports that it modified one. Neither failure has anything to do with the pull request that sees it. Ran the hook over the file with the pinned ruff (0.6.9, from the hook's own additional_dependencies) and committed what it produced. The file's own eight tests still pass, tests/test_formatter_fixed_point.py goes from 1 failed / 10 passed to 11 passed, and pre-commit run --all-files passes all three hooks.
Member
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
unslothai#11345 landed tests/studio/test_pull_requests_cancel_superseded_runs.py with one assert the ruff-format-with-kwargs hook rewrites, so main is not a fixed point of its own formatter. That fails tests/test_formatter_fixed_point.py, which is in the "Repo tests (CPU, rest)" shard, and it fails pre-commit.ci on every pull request, since pre-commit.ci runs the hook over all files and reports that it modified one. Neither failure has anything to do with the pull request that sees it. Ran the hook over the file with the pinned ruff (0.6.9, from the hook's own additional_dependencies) and committed what it produced. The file's own eight tests still pass, tests/test_formatter_fixed_point.py goes from 1 failed / 10 passed to 11 passed, and pre-commit run --all-files passes all three hooks.
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.
mainis not a fixed point of its own formatter, so two checks are red on every pull request that merges with it.#11345 landed
tests/studio/test_pull_requests_cancel_superseded_runs.pywith one assert that theruff-format-with-kwargshook rewrites:That shows up twice, neither time on the PR that caused it:
tests/test_formatter_fixed_point.py::test_every_tracked_python_file_is_already_formattedfails in theRepo tests (CPU, rest)shard, naming the file and the command to fix it. The guard did its job.pre-commit.ci - prfails on every pull request, because pre-commit.ci runs the hook over all files and reports "files were modified by this hook". There is nothing to autofix onto the contributor's branch, so the check stays red with no way for them to clear it.I ran the hook over the file with the ruff the hook pins itself (
0.6.9, from itsadditional_dependencies) and committed exactly what it produced.Checks
tests/test_formatter_fixed_point.py: 1 failed / 10 passed before, 11 passed after. Restoring the file frommainfails it again, naming the same file.tests/studio/test_pull_requests_cancel_superseded_runs.py: 8 passed, so the reformatted assert still tests what it did.pre-commit run --all-fileswith the pinned environment: all three hooks pass.