[`ruff`] Treat `yield` before `break` from a terminal loop as terminal (`RUF075`) (#25447)
## Summary Closes #25378. Extends the yield-before-return terminal check to also cover yield-before-break, but only when the enclosing loop is itself in a terminal position. break exits the innermost loop, so a yield right before it has no cleanup code after it in that case. ## Test Plan mdtest passes for fallible-context-manager.md across the new and existing cases
A
Anish Giri committed
35ee0888f4ed173ed35d2fcd31d261a085a89c21
Parent: 1a8520e
Committed by GitHub <noreply@github.com>
on 5/29/2026, 2:10:37 PM