Add classes MethodWithArgs
, SceneInteractContinue
and SceneInteractRerun
inside new module manim.data_structures
#4315
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.
Overview: What does this pull request change?
MethodWithArgs
,SceneInteractContinue
andSceneInteractRerun
. Currently, they all exist inside a newmanim.data_structures
file, although I intend to moveSceneInteractContinue
andSceneInteractRerun
intoscene.py
if PR Moveconfigure_pygui
into aScene
method and removemanim.gui
#4314 is merged first.Scene.queue
,_AnimationBuilder.methods
and_MethodAnimation.methods
objects of these classes instead of tuples.Motivation and Explanation: Why and how do your changes improve the library?
Scene.queue
,_AnimationBuilder.methods
and_MethodAnimation.methods
contain tuples where the first element represents a method to be called, the second one is its args and the third one is its kwargs. Moreover, in the case ofScene.queue
, the first element (a string) might not necessarily represent a method: it can be a key starting with "rerun" (in which case the args are not used and only some key-value pairs are extracted from the kwargs) or with "exit" (in which case neither the args nor the kwargs are used). On first sight, this might be very confusing. Previously, there were no docs for this behavior and I asked for them to be added in a comment I made while reviewing PR #4260. Now, I believe that it would be better if those were different objects from different classes altogether.Links to added or changed documentation pages
Further Information and Comments
Reviewer Checklist