fix(docs): drop the unused locals ruff has been failing main on - #54
Merged
Conversation
Six F-rules in model_orchestration_patterns/build_diagrams.py, all of them values unpacked and then never read — plus a function-local `import math` with no `math.` anywhere in the file. Nothing computed is lost: every one reads a list by index, so removing the name removes no work. `bh` at the canvas clamp stays — it IS read two lines down; only `bw` goes. Verified behaviour-preserving by regenerating the diagrams: the script rewrites every committed SVG byte-identically both before and after, so the control proves the check can see a change at all.
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.
main's CI has been red onlintfor at least the last five pushes — every one a docs commit from the orchestration-patterns work, none of them touching the code the failure is in. This turns it green.The six
All in
docs/model_orchestration_patterns/build_diagrams.py:lrangebase,bhunpacked, never readimport math— nomath.anywhere in the filebwunpacked, never read_elabelbw,bhunpacked, never readbhat the canvas clamp stays — it is read two lines below, at thebox[1] = min(max(...))clamp. Onlybwgoes there.Nothing computed is lost: each site reads a list by index, so dropping the name drops no work.
Test plan
ruff check .→ All checks passedpython3 build_diagrams.pyrewrites every committed SVG byte-identically after the change —git statusshows only the.pyitself🤖 Generated with Claude Code