Remove duplicated inline body from Novel2MoviePipeline.__call__#65
Open
fviolette26 wants to merge 1 commit into
Open
Remove duplicated inline body from Novel2MoviePipeline.__call__#65fviolette26 wants to merge 1 commit into
fviolette26 wants to merge 1 commit into
Conversation
`__call__` re-implemented the entire pipeline inline (~510 lines) even though the same logic already lives in the `plan_text_artifacts` and `render_video_artifacts` methods. Those two methods were therefore dead code — defined but never reached — and the two copies could silently drift apart over time. Make `__call__` delegate to the methods, matching the structure the rest of the class already assumes. Behavior is unchanged: the extracted methods carry the same logic, including the unbounded-extraction safety caps (`_ensure_extraction_cap`, `MAX_EXTRACTED_EVENTS`, `MAX_SCENES_PER_EVENT`). Net: -512 lines, no behavior change. Co-Authored-By: Claude Opus 4.8 (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.
Problem
Novel2MoviePipeline.__call__re-implements the entire pipeline inline (~510 lines), but the same logic already lives in theplan_text_artifactsandrender_video_artifactsmethods on the same class. As a result:plan_text_artifactsandrender_video_artifactsare dead code — defined but never reached.Fix
Make
__call__delegate to the existing methods:Behavior unchanged
The extracted methods carry the identical logic, including the unbounded-extraction safety caps (
_ensure_extraction_cap,MAX_EXTRACTED_EVENTS,MAX_SCENES_PER_EVENT). Net diff: +2 / −512, no behavior change. Full test suite passes (152 passed, 11 subtests).🤖 Generated with Claude Code