Repository navigation
ruff-audit: zero-tolerance py3.11 syntax floor over the whole repo (#7667) - #7694
Merged
Merged
Conversation
…ot just gitgalaxy/ (#7667) PR CI runs 3.12 only and the baseline-gated lint scans gitgalaxy/ only, so #7637's backslash-in-f-string in tests/cics_crucible/ passed every PR check and broke main's py3.11 legs. ruff_audit --ci now also runs `ruff check . --select E9` at pyproject's py311 target; on #7637's file it reports line 145, the line that broke main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 4, 2026
…has no ruff) test_ci_check_end_to_end and test_ruff_audit_fails_on_format_alone stub the lint and format calls; the new syntax pass ran real ruff and failed with FileNotFoundError on Smoke. Also pin that a syntax finding alone fails run_ci_check, and scope the needs-ruff skip to the three tests that run ruff. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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
tests/ruff_audit.py --cigains a zero-tolerance syntax pass,run_syntax_check(). It runsruff check . --select E9over the whole repo at pyproject'starget-version = "py311", and fails on anything a 3.11 interpreter cannot parse. pyproject'stests/fixtures/*exclude still applies.Why
Main went red on #7667: every py3.11 leg of the Full Suite Gate failed, on Windows, Ubuntu and macOS. The cause was #7637, which put a backslash inside an f-string expression in
tests/cics_crucible/test_container_ccsid_4270.py:145. That's legal on 3.12 and a SyntaxError on 3.11. #7637 passed every PR check for two reasons:SCAN_ROOT) scansgitgalaxy/only, so ruff never parsedtests/.Ruff already knows the 3.11 floor. Run on #7637's version of the file, the new check reports the lines that broke main:
This is item 2 of the red-main review of Oct 31 to Nov 4. Of the 25
ci-red-mainissues in that window, 3 came from legs PR CI never runs; this closes the Python 3.11 one.Cost
One extra
ruff checkwith a single rule family over about 1,800 files, a second or two, inside the existingruff-auditjob. No new job, no new runner request.Class / Sibling gaps
Checks
tests/tools/test_ruff_syntax_gate.py, 3 tests: flags a 3.11-invalid f-string undertests/, passes clean code and the excluded fixtures, and the live repo parses under 3.11.ruff_audit.py --ci: OK, 72-finding baseline, format clean.test_change_classifier.py,test_content_keyed_baseline.py,test_audit_skip_plan.py: 91 passed.🤖 Generated with Claude Code