refactor(validatie): inline _stream_lines, drop tuple-return shape#70
Merged
Conversation
Reviewer-suggested simplificatie van 9_beheer.py: - _stream_lines (single-call abstractie) inlinen in _run_in_placeholder; verwijdert het Iterator[tuple[str, int | None]] retourtype dat (None) yieldde op elke regel behalve de laatste. - proc.returncode wordt nu direct uit proc gelezen na proc.wait(), in plaats van via een terminator-tuple terug te lopen. - Expliciete final placeholder.code() na de loop garandeert dat de [exit=N]-regel zichtbaar wordt, ook als de throttle hem anders zou overslaan. - Inline-commentaren trim naar één-regel why's (deque-bound en throttle-rationale). - Iterator-import laten vallen (geen overige callers). 63/63 pytest groen. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Follow-up cleanup op #63, op basis van een 3-agent review (reuse / quality / efficiency):
_stream_linesinlinen. Single-call abstractie — per CEDA "no abstractions for single-use code". Verwijdert het lekke retourtypeIterator[tuple[str, int | None]]datNoneyieldde op elke regel behalve de laatste.proc.returncodedirect uitprocnaproc.wait(), in plaats van via een terminator-tuple terug te lopen door de caller-loop.[exit=N]-regel zichtbaar wordt, ook als de throttle hem anders binnen het_PAINT_INTERVAL_S-venster zou overslaan.Iterator-import laten vallen — geen overige callers.Diff: -25 / +14.
Test plan
uv run python -m pytest(63/63 groen vanuitvalidatie_samenwijzer/)uv run ruff check app/pages/9_beheer.py(clean)uv run ruff format --check app/pages/9_beheer.py(clean)/beheermetBEHEER_ENABLED=true: druk op "Run seed.py" en verifieer (a) live output streamt, (b)[exit=0]-terminator verschijnt, (c) groen✅ Klaar-bericht onder de output.🤖 Generated with Claude Code