A community-maintained Python framework for creating mathematical animations.
Add __all__ module variables (#367)
Leo Torres8b1b30b75853
diff --git a/manim/__init__.py b/manim/__init__.pyindex b7170bccd..2ce84f241 100644--- a/manim/__init__.py+++ b/manim/__init__.py@@ -5,10 +5,12 @@# global config dict is called 'config', just like the module itself. That's# why we import the module first with a different name, and then the dict.from . import config as _config-from .config import config, tempconfig+from .config import config, file_writer_config, camera_configfrom .constants import *+from .container import *+from .animation.animation import *from .animation.composition import *from .animation.creation import *@@ -26,6 +28,7 @@ from .camera.camera import *from .camera.mapping_camera import *from .camera.moving_camera import *from .camera.three_d_camera import *+from .camera.multi_camera import *from .mobject.coordinate_systems import *from .mobject.changing import *@@ -58,10 +61,10 @@ from .scene.moving_camera_scene import *from .scene.reconfigurable_scene import *from .scene.scene import *from .scene.sample_space_scene import *-from .scene.graph_scene import *from .scene.three_d_scene import *from .scene.vector_space_scene import *from .scene.zoomed_scene import *+from .scene.scene_file_writer import *from .utils.bezier import *from .utils.color import *diff --git a/manim/animation/animation.py b/manim/animation/animation.pyindex 1bd05dc40..f136d2bcb 100644--- a/manim/animation/animation.py+++ b/manim/animation/animation.py@@ -1,4 +1,9 @@"""Animate mobjects."""+++__all__ = ["Animation"]++from copy import deepcopyimport numpy as npdiff --git a/manim/animation/composition.py b/manim/animation/composition.pyindex 942091a5f..21ef0845e 100644--- a/manim/animation/composition.py+++ b/manim/animation/composition.py@@ -9,6 +9,8 @@ from ..utils.config_ops import digest_configfrom ..utils.iterables import remove_list_redundanciesfrom ..utils.rate_functions import linear+__all__ = ["AnimationGroup", "Succession", "LaggedStart", "LaggedStartMap"]+DEFAULT_LAGGED_START_LAG_RATIO = 0.05diff --git a/manim/animation/creation.py b/manim/animation/creation.pyindex 22e8f3a5e..ef67b0eb9 100644--- a/manim/animation/creation.py+++ b/manim/animation/creation.py@@ -1,4 +1,19 @@"""Animate the display or removal of a mobject from a scene."""+++__all__ = [+ "ShowPartial",+ "ShowCreation",+ "Uncreate",+ "DrawBorderThenFill",+ "Write",+ "ShowIncreasingSubsets",+ "AddTextLetterByLetter",+ "ShowSubmobjectsOneByOne",+ "AddTextWordByWord",+]++from ..animation.animation import Animationfrom ..animation.composition import Successionfrom ..mobject.types.vectorized_mobject import VMobject@@ -132,7 +147,7 @@ class ShowIncreasingSubsets(Animation):class AddTextLetterByLetter(ShowIncreasingSubsets):"""- Add a Text Object letter by letter on the scene. Use time_per_char to change frequency of appearance of the letters.+ Add a Text Object letter by letter on the scene. Use time_per_char to change frequency of appearance of the letters."""CONFIG = {diff --git a/manim/animation/fading.py b/manim/animation/fading.pyindex 59e09134c..362f01f31 100644--- a/manim/animation/fading.py+++ b/manim/animation/fading.py@@ -1,4 +1,21 @@"""Fading in and out of view."""+++__all__ = [+ "FadeOut",+ "FadeIn",+ "FadeInFrom",+ "FadeInFromDown",+ "FadeOutAndShift",+ "FadeOutAndShiftDown",+ "FadeInFromPoint",+ "FadeInFromLarge",+ "VFadeIn",+ "VFadeOut",+ "VFadeInThenOut",+]++from ..animation.animation import Animationfrom ..animation.animation import DEFAULT_ANIMATION_LAG_RATIOfrom ..animation.transform import Transformdiff --git a/manim/animation/growing.py b/manim/animation/growing.pyindex fe3c9249f..8b7919019 100644--- a/manim/animation/growing.py+++ b/manim/animation/growing.py@@ -1,6 +1,13 @@-from ..animation.transform import Transform+__all__ = [+ "GrowFromPoint",+ "GrowFromCenter",+ "GrowFromEdge",+ "GrowArrow",+ "SpinInFromNothing",+]+-# from ..utils.paths import counterclockwise_path+from ..animation.transform import Transformfrom ..constants import PIdiff --git a/manim/animation/indication.py b/manim/animation/indication.pyindex fd6710c1b..1cf3e1bfb 100644--- a/manim/animation/indication.py+++ b/manim/animation/indication.py@@ -1,3 +1,21 @@+__all__ = [+ "FocusOn",+ "Indicate",+ "Flash",+ "CircleIndicate",+ "ShowPassingFlash",+ "ShowCreationThenDestruction",+ "ShowCreationThenFadeOut",+ "AnimationOnSurroundingRectangle",+ "ShowPassingFlashAround",+ "ShowCreationThenDestructionAround",+ "ShowCreationThenFadeAround",+ "ApplyWave",+ "WiggleOutThenIn",+ "TurnInsideOut",+]++import numpy as npfrom ..constants import *diff --git a/manim/animation/movement.py b/manim/animation/movement.pyindex de1dea0f1..571e6e29f 100644--- a/manim/animation/movement.py+++ b/manim/animation/movement.py@@ -1,3 +1,12 @@+__all__ = [+ "Homotopy",+ "SmoothedVectorizedHomotopy",+ "ComplexHomotopy",+ "PhaseFlow",+ "MoveAlongPath",+]++from ..animation.animation import Animationfrom ..utils.rate_functions import lineardiff --git a/manim/animation/numbers.py b/manim/animation/numbers.pyindex 98e6b1f6d..54466232c 100644--- a/manim/animation/numbers.py+++ b/manim/animation/numbers.py@@ -1,3 +1,6 @@+__all__ = ["ChangingDecimal", "ChangeDecimalToValue"]++import warningsfrom ..animation.animation import Animationdiff --git a/manim/animation/rotation.py b/manim/animation/rotation.pyindex f0acba243..39053e17f 100644--- a/manim/animation/rotation.py+++ b/manim/animation/rotation.py@@ -1,3 +1,6 @@+__all__ = ["Rotating", "Rotate"]++from ..animation.animation import Animationfrom ..animation.transform import Transformfrom ..constants import OUTdiff --git a/manim/animation/specialized.py b/manim/animation/specialized.pyindex f5fc3fa36..558b4131a 100644--- a/manim/animation/specialized.py+++ b/manim/animation/specialized.py@@ -1,3 +1,6 @@+__all__ = ["MoveCar", "Broadcast"]++import operator as opfrom ..animation.composition import LaggedStartdiff --git a/manim/animation/transform.py b/manim/animation/transform.pyindex 6c01e5690..82e9dc852 100644--- a/manim/animation/transform.py+++ b/manim/animation/transform.py@@ -1,3 +1,26 @@+__all__ = [+ "Transform",+ "ReplacementTransform",+ "TransformFromCopy",+ "ClockwiseTransform",+ "CounterclockwiseTransform",+ "MoveToTarget",+ "ApplyMethod",+ "ApplyPointwiseFunction",+ "ApplyPointwiseFunctionToCenter",+ "FadeToColor",+ "ScaleInPlace",+ "ShrinkToCenter",+ "Restore",+ "ApplyFunction",+ "ApplyMatrix",+ "ApplyComplexFunction",+ "CyclicReplace",+ "Swap",+ "TransformAnimations",+]++import inspectimport numpy as npdiff --git a/manim/animation/update.py b/manim/animation/update.pyindex 4166cc3fb..fdc808950 100644--- a/manim/animation/update.py+++ b/manim/animation/update.py@@ -1,3 +1,6 @@+__all__ = ["UpdateFromFunc", "UpdateFromAlphaFunc", "MaintainPositionRelativeTo"]++import operator as opfrom ..animation.animation import Animationdiff --git a/manim/camera/camera.py b/manim/camera/camera.pyindex 11834c921..75bf48c2f 100644--- a/manim/camera/camera.py+++ b/manim/camera/camera.py@@ -1,4 +1,9 @@"A Camera converts the mobjects contained in a Scene into an array of pixels"+++__all__ = ["Camera", "BackgroundColoredVMobjectDisplayer"]++from functools import reduceimport itertools as itimport operator as opdiff --git a/manim/camera/mapping_camera.py b/manim/camera/mapping_camera.pyindex 184f0d8d4..f96d3c92a 100644--- a/manim/camera/mapping_camera.py+++ b/manim/camera/mapping_camera.py@@ -1,3 +1,6 @@+__all__ = ["MappingCamera", "OldMultiCamera", "SplitScreenCamera"]++import numpy as npfrom ..camera.camera import Cameradiff --git a/manim/camera/moving_camera.py b/manim/camera/moving_camera.pyindex 253498c76..53bdadaa9 100644--- a/manim/camera/moving_camera.py+++ b/manim/camera/moving_camera.py@@ -1,3 +1,6 @@+__all__ = ["CameraFrame", "MovingCamera"]++from ..camera.camera import Camerafrom ..config import configfrom ..constants import ORIGIN, WHITEdiff --git a/manim/camera/multi_camera.py b/manim/camera/multi_camera.pyindex b78685812..bc5dc2e71 100644--- a/manim/camera/multi_camera.py+++ b/manim/camera/multi_camera.py@@ -1,10 +1,12 @@+__all__ = ["MultiCamera"]++from ..camera.moving_camera import MovingCamerafrom ..utils.iterables import list_difference_updateclass MultiCamera(MovingCamera):- """Camera Object that allows for multiple perspectives.- """+ """Camera Object that allows for multiple perspectives."""CONFIG = {"allow_cameras_to_capture_their_own_display": False,diff --git a/manim/camera/three_d_camera.py b/manim/camera/three_d_camera.pyindex 5b4706304..c5dd12c60 100644--- a/manim/camera/three_d_camera.py+++ b/manim/camera/three_d_camera.py@@ -1,3 +1,6 @@+__all__ = ["ThreeDCamera"]++import numpy as npfrom ..camera.camera import Cameradiff --git a/manim/container.py b/manim/container.pyindex a80c92eb2..5182b6858 100644--- a/manim/container.py+++ b/manim/container.py@@ -3,12 +3,14 @@ Abstract base class for several objects used by manim. In particular, both:class:`~.Scene` and :class:`~.Mobject` inherit from Container."""-from abc import ABC, abstractmethod-from .utils.config_ops import digest_config__all__ = ["Container"]+from abc import ABC, abstractmethod+from .utils.config_ops import digest_config++class Container(ABC):"""Abstract base class for several objects used by manim. In particular, both:class:`~.Scene` and :class:`~.Mobject` inherit from Container.diff --git a/manim/mobject/changing.py b/manim/mobject/changing.pyindex 02475d629..4dc5a484a 100644--- a/manim/mobject/changing.py+++ b/manim/mobject/changing.py@@ -1,3 +1,6 @@+__all__ = ["AnimatedBoundary", "TracedPath"]++from ..constants import *from ..mobject.types.vectorized_mobject import VMobjectfrom ..mobject.types.vectorized_mobject import VGroupdiff --git a/manim/mobject/coordinate_systems.py b/manim/mobject/coordinate_systems.pyindex 713659f32..e3c89d365 100644--- a/manim/mobject/coordinate_systems.py+++ b/manim/mobject/coordinate_systems.py@@ -1,3 +1,6 @@+__all__ = ["CoordinateSystem", "Axes", "ThreeDAxes", "NumberPlane", "ComplexPlane"]++import numpy as npimport numbers@@ -280,7 +283,7 @@ class NumberPlane(Axes):def get_lines(self):"""Generate all the lines, faded and not faded. Two sets of lines are generated: one parallel to the X-axis, and parallel to the Y-axis.-+Returns-------Tuple[:class:`~.VGroup`, :class:`~.VGroup`]@@ -313,9 +316,9 @@ class NumberPlane(Axes):axis_perpendicular_to : :class:`~.Line`The axis with which the lines will be perpendicular.-+ratio_faded_lines : :class:`float`- The number of faded lines between each non-faded line.+ The number of faded lines between each non-faded line.freq : :class:`float`Frequency of non-faded lines (number of non-faded lines per graph unit).@@ -323,7 +326,7 @@ class NumberPlane(Axes):Returns-------Tuple[:class:`~.VGroup`, :class:`~.VGroup`]- The first (i.e the non-faded lines parallel to `axis_parallel_to`) and second (i.e the faded lines parallel to `axis_parallel_to`) sets of lines, respectively.+ The first (i.e the non-faded lines parallel to `axis_parallel_to`) and second (i.e the faded lines parallel to `axis_parallel_to`) sets of lines, respectively."""line = Line(axis_parallel_to.get_start(), axis_parallel_to.get_end())dense_freq = ratio_faded_linesdiff --git a/manim/mobject/frame.py b/manim/mobject/frame.pyindex 1c4b6e41b..d2a8ccd0c 100644--- a/manim/mobject/frame.py+++ b/manim/mobject/frame.py@@ -1,3 +1,11 @@+__all__ = [+ "ScreenRectangle",+ "FullScreenRectangle",+ "FullScreenFadeRectangle",+ "PictureInPictureFrame",+]++from ..constants import *from ..config import configfrom ..mobject.geometry import Rectanglediff --git a/manim/mobject/functions.py b/manim/mobject/functions.pyindex f12ec3767..68a5ebbee 100644--- a/manim/mobject/functions.py+++ b/manim/mobject/functions.py@@ -1,3 +1,6 @@+__all__ = ["ParametricFunction", "FunctionGraph"]++from ..constants import *from ..config import configfrom ..mobject.types.vectorized_mobject import VMobjectdiff --git a/manim/mobject/geometry.py b/manim/mobject/geometry.pyindex b8d2ae253..7c30ebcbe 100644--- a/manim/mobject/geometry.py+++ b/manim/mobject/geometry.py@@ -1,4 +1,37 @@"""Mobjects that are simple geometric shapes."""+++__all__ = [+ "TipableVMobject",+ "Arc",+ "ArcBetweenPoints",+ "CurvedArrow",+ "CurvedDoubleArrow",+ "Circle",+ "Dot",+ "SmallDot",+ "Ellipse",+ "AnnularSector",+ "Sector",+ "Annulus",+ "Line",+ "DashedLine",+ "TangentLine",+ "Elbow",+ "Arrow",+ "Vector",+ "DoubleArrow",+ "CubicBezier",+ "Polygon",+ "RegularPolygon",+ "Triangle",+ "ArrowTip",+ "Rectangle",+ "Square",+ "RoundedRectangle",+]++import warningsimport numpy as npimport mathdiff --git a/manim/mobject/matrix.py b/manim/mobject/matrix.pyindex 4d132e46e..30e7db90e 100644--- a/manim/mobject/matrix.py+++ b/manim/mobject/matrix.py@@ -1,3 +1,15 @@+__all__ = [+ "Matrix",+ "DecimalMatrix",+ "IntegerMatrix",+ "MobjectMatrix",+ "matrix_to_tex_string",+ "matrix_to_mobject",+ "vector_coordinate_label",+ "get_det_text",+]++import numpy as npfrom ..constants import *@@ -122,7 +134,7 @@ class Matrix(VMobject):def get_rows(self):"""Return rows of the matrix as VGroups-+Returns--------List[:class:`~.VGroup`]@@ -134,12 +146,12 @@ class Matrix(VMobject):def set_row_colors(self, *colors):"""Set individual colors for each row of the matrix-+Parameters----------colors : :class:`str`The list of colors; each color specified corresponds to a row.-+Returns-------:class:`Matrix`diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.pyindex 92a3de571..66f429263 100644--- a/manim/mobject/mobject.py+++ b/manim/mobject/mobject.py@@ -1,4 +1,9 @@"""Base classes for objects that can be displayed."""+++__all__ = ["Mobject", "Group"]++from functools import reduceimport copyimport itertools as itdiff --git a/manim/mobject/mobject_update_utils.py b/manim/mobject/mobject_update_utils.pyindex ef40a8773..f43e69d94 100644--- a/manim/mobject/mobject_update_utils.py+++ b/manim/mobject/mobject_update_utils.py@@ -1,3 +1,15 @@+__all__ = [+ "assert_is_mobject_method",+ "always",+ "f_always",+ "always_redraw",+ "always_shift",+ "always_rotate",+ "turn_animation_into_updater",+ "cycle_animation",+]++import inspectimport numpy as npdiff --git a/manim/mobject/number_line.py b/manim/mobject/number_line.pyindex e2e6ff963..0d827df26 100644--- a/manim/mobject/number_line.py+++ b/manim/mobject/number_line.py@@ -1,4 +1,9 @@"""Mobject representing a number line."""+++__all__ = ["NumberLine", "UnitInterval"]++import operator as opfrom ..constants import *diff --git a/manim/mobject/numbers.py b/manim/mobject/numbers.pyindex 6c5caf3ac..79335c4f7 100644--- a/manim/mobject/numbers.py+++ b/manim/mobject/numbers.py@@ -1,3 +1,6 @@+__all__ = ["DecimalNumber", "Integer"]++from ..constants import *from ..mobject.svg.tex_mobject import SingleStringTexMobjectfrom ..mobject.types.vectorized_mobject import VMobjectdiff --git a/manim/mobject/probability.py b/manim/mobject/probability.pyindex a9fd5658d..2a7ce7597 100644--- a/manim/mobject/probability.py+++ b/manim/mobject/probability.py@@ -1,3 +1,6 @@+__all__ = ["SampleSpace", "BarChart"]++from ..constants import *from ..mobject.geometry import Linefrom ..mobject.geometry import Rectanglediff --git a/manim/mobject/shape_matchers.py b/manim/mobject/shape_matchers.pyindex 00b8c54a4..378201055 100644--- a/manim/mobject/shape_matchers.py+++ b/manim/mobject/shape_matchers.py@@ -1,3 +1,6 @@+__all__ = ["SurroundingRectangle", "BackgroundRectangle", "Cross", "Underline"]++from ..constants import *from ..mobject.geometry import Linefrom ..mobject.geometry import Rectanglediff --git a/manim/mobject/svg/brace.py b/manim/mobject/svg/brace.pyindex e16e1d7c9..47c742293 100644--- a/manim/mobject/svg/brace.py+++ b/manim/mobject/svg/brace.py@@ -1,3 +1,6 @@+__all__ = ["Brace", "BraceLabel", "BraceText"]++import numpy as npfrom ...animation.composition import AnimationGroupdiff --git a/manim/mobject/svg/code_mobject.py b/manim/mobject/svg/code_mobject.pyindex 0ae7c415e..86ba413de 100644--- a/manim/mobject/svg/code_mobject.py+++ b/manim/mobject/svg/code_mobject.py@@ -1,3 +1,30 @@+"""+1) Code is VGroup() with three things+ 1.1) Code[0] is Code.background_mobject+ which can be a+ 1.1.1) Rectangle() if background == "rectangle"+ 1.1.2) VGroup() of Rectangle() and Dot() for three buttons if background == "window"+ 1.2) Code[1] is Code.line_numbers Which is a Paragraph() object, this mean you can use+ Code.line_numbers[0] or Code[1][0] to access first line number+ 1.3) Code[2] is Code.code+ 1.3.1) Which is a Paragraph() with color highlighted, this mean you can use+ Code.code[1] or Code[2][1]+ line number 1+ Code.code[1][0] or Code.code[1][0]+ first character of line number 1+ Code.code[1][0:5] or Code.code[1][0:5]+ first five characters of line number 1+"""+++__all__ = [+ "Code",+ "hilite_me",+ "get_default_style",+ "insert_line_numbers",+]++import htmlimport osfrom ...constants import *@@ -12,24 +39,6 @@ from pygments import highlightfrom pygments.lexers import get_lexer_by_namefrom pygments.formatters.html import HtmlFormatter-"""-1) Code is VGroup() with three things- 1.1) Code[0] is Code.background_mobject- which can be a- 1.1.1) Rectangle() if background == "rectangle"- 1.1.2) VGroup() of Rectangle() and Dot() for three buttons if background == "window"- 1.2) Code[1] is Code.line_numbers Which is a Paragraph() object, this mean you can use- Code.line_numbers[0] or Code[1][0] to access first line number- 1.3) Code[2] is Code.code- 1.3.1) Which is a Paragraph() with color highlighted, this mean you can use- Code.code[1] or Code[2][1]- line number 1- Code.code[1][0] or Code.code[1][0]- first character of line number 1- Code.code[1][0:5] or Code.code[1][0:5]- first five characters of line number 1-"""-class Code(VGroup):CONFIG = {diff --git a/manim/mobject/svg/drawings.py b/manim/mobject/svg/drawings.pyindex 67dd69465..95614fddb 100644--- a/manim/mobject/svg/drawings.py+++ b/manim/mobject/svg/drawings.py@@ -1,3 +1,30 @@+__all__ = [+ "Lightbulb",+ "BitcoinLogo",+ "Guitar",+ "Speedometer",+ "AoPSLogo",+ "PartyHat",+ "Laptop",+ "PatreonLogo",+ "VideoIcon",+ "VideoSeries",+ "Headphones",+ "Clock",+ "ClockPassesTime",+ "Bubble",+ "SpeechBubble",+ "DoubleSpeechBubble",+ "ThoughtBubble",+ "Car",+ "VectorizedEarth",+ "Logo",+ "DeckOfCards",+ "PlayingCard",+ "SuitSymbol",+]++import itertools as itimport stringdiff --git a/manim/mobject/svg/svg_mobject.py b/manim/mobject/svg/svg_mobject.pyindex d78d8ac42..247c03215 100644--- a/manim/mobject/svg/svg_mobject.py+++ b/manim/mobject/svg/svg_mobject.py@@ -1,4 +1,9 @@"""Mobjects generated from an SVG file."""+++__all__ = ["SVGMobject", "VMobjectFromSVGPathstring", "string_to_numbers"]++import itertools as itimport reimport osdiff --git a/manim/mobject/svg/tex_mobject.py b/manim/mobject/svg/tex_mobject.pyindex 9b14e8819..9f6afa315 100644--- a/manim/mobject/svg/tex_mobject.py+++ b/manim/mobject/svg/tex_mobject.py@@ -1,3 +1,14 @@+__all__ = [+ "TexSymbol",+ "SingleStringTexMobject",+ "TexMobject",+ "TextMobject",+ "BulletedList",+ "TexMobjectFromPresetString",+ "Title",+]++from functools import reduceimport operator as opdiff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.pyindex 8272a3943..6edfca975 100644--- a/manim/mobject/svg/text_mobject.py+++ b/manim/mobject/svg/text_mobject.py@@ -1,3 +1,6 @@+__all__ = ["TextSetting", "Text", "TextWithFixHeight", "Paragraph"]++import reimport osimport copydiff --git a/manim/mobject/three_d_utils.py b/manim/mobject/three_d_utils.pyindex bf02d3321..5acc8f4bd 100644--- a/manim/mobject/three_d_utils.py+++ b/manim/mobject/three_d_utils.py@@ -1,3 +1,15 @@+__all__ = [+ "get_3d_vmob_gradient_start_and_end_points",+ "get_3d_vmob_start_corner_index",+ "get_3d_vmob_end_corner_index",+ "get_3d_vmob_start_corner",+ "get_3d_vmob_end_corner",+ "get_3d_vmob_unit_normal",+ "get_3d_vmob_start_corner_unit_normal",+ "get_3d_vmob_end_corner_unit_normal",+]++import numpy as npfrom ..constants import ORIGINdiff --git a/manim/mobject/three_dimensions.py b/manim/mobject/three_dimensions.pyindex 4f1194dd4..54cb6a06d 100644--- a/manim/mobject/three_dimensions.py+++ b/manim/mobject/three_dimensions.py@@ -1,3 +1,6 @@+__all__ = ["ThreeDVMobject", "ParametricSurface", "Sphere", "Cube", "Prism"]++from ..constants import *from ..mobject.geometry import Squarefrom ..mobject.types.vectorized_mobject import VGroupdiff --git a/manim/mobject/types/image_mobject.py b/manim/mobject/types/image_mobject.pyindex f50f76352..25badc257 100644--- a/manim/mobject/types/image_mobject.py+++ b/manim/mobject/types/image_mobject.py@@ -1,3 +1,6 @@+__all__ = ["AbstractImageMobject", "ImageMobject", "ImageMobjectFromCamera"]++import numpy as npfrom PIL import Imagediff --git a/manim/mobject/types/point_cloud_mobject.py b/manim/mobject/types/point_cloud_mobject.pyindex c0bd8a199..838908a84 100644--- a/manim/mobject/types/point_cloud_mobject.py+++ b/manim/mobject/types/point_cloud_mobject.py@@ -1,3 +1,6 @@+__all__ = ["PMobject", "Mobject1D", "Mobject2D", "PGroup", "PointCloudDot", "Point"]++from ...constants import *from ...mobject.mobject import Mobjectfrom ...utils.bezier import interpolatediff --git a/manim/mobject/types/vectorized_mobject.py b/manim/mobject/types/vectorized_mobject.pyindex 864da5210..1d93ee57c 100644--- a/manim/mobject/types/vectorized_mobject.py+++ b/manim/mobject/types/vectorized_mobject.py@@ -1,4 +1,16 @@"""Mobjects that use vector graphics."""+++__all__ = [+ "VMobject",+ "VGroup",+ "VDict",+ "VectorizedPoint",+ "CurvesAsSubmobjects",+ "DashedVMobject",+]++import itertools as itimport sys@@ -881,7 +893,7 @@ class VDict(VMobject):mapping_or_iterable : Union[:class:`Mapping`, Iterable[Tuple[Hashable, :class:`~.VMobject`]]], optionalThe parameter specifying the key-value mapping of keys and mobjects.show_keys : :class:`bool`, optional- Whether to also display the key associated with+ Whether to also display the key associated withthe mobject. This might be useful when debugging,especially when there are a lot of mobjects in the:class:`VDict`. Defaults to False.@@ -891,7 +903,7 @@ class VDict(VMobject):Attributes----------show_keys : :class:`bool`- Whether to also display the key associated with+ Whether to also display the key associated withthe mobject. This might be useful when debugging,especially when there are a lot of mobjects in the:class:`VDict`. When displayed, the key is towards@@ -937,7 +949,7 @@ class VDict(VMobject):def remove(self, key):"""Removes the mobject from the :class:`VDict` object having the key `key`-+Also, it internally removes the mobject from the `submobjects` :class:`list`of :class:`~.Mobject`, (which is responsible for removing it from the screen)@@ -964,12 +976,12 @@ class VDict(VMobject):def __getitem__(self, key):"""Overriding the [] operator for getting submobject by key-+Parameters----------key : HashableThe key of the submoject to be accessed-+Returns-------:class:`VMobject`@@ -992,7 +1004,7 @@ class VDict(VMobject):The key of the submoject to be assignedvalue : :class:`VMobject`The submobject to bind the key to-+Returns-------None@@ -1009,7 +1021,7 @@ class VDict(VMobject):def get_all_submobjects(self):"""To get all the submobjects associated with a particular :class:`VDict` object-+Returns-------:class:`dict_values`diff --git a/manim/mobject/value_tracker.py b/manim/mobject/value_tracker.pyindex c08d02925..f680657a4 100644--- a/manim/mobject/value_tracker.py+++ b/manim/mobject/value_tracker.py@@ -1,3 +1,6 @@+__all__ = ["ValueTracker", "ExponentialValueTracker", "ComplexValueTracker"]++import numpy as npfrom ..utils.paths import straight_pathdiff --git a/manim/mobject/vector_field.py b/manim/mobject/vector_field.pyindex ad5310a72..48971ec71 100644--- a/manim/mobject/vector_field.py+++ b/manim/mobject/vector_field.py@@ -1,3 +1,17 @@+__all__ = [+ "VectorField",+ "StreamLines",+ "ShowPassingFlashWithThinningStrokeWidth",+ "AnimatedStreamLines",+ "get_colored_background_image",+ "get_rgb_gradient_function",+ "get_color_field_image_file",+ "move_along_vector_field",+ "move_submobjects_along_vector_field",+ "move_points_along_vector_field",+]++import numpy as npimport osimport itertools as itdiff --git a/manim/scene/graph_scene.py b/manim/scene/graph_scene.pyindex 2d8a4d0e0..67fd95daf 100644--- a/manim/scene/graph_scene.py+++ b/manim/scene/graph_scene.py@@ -1,3 +1,5 @@+__all__ = ["GraphScene"]+import itertools as itfrom ..config import configdiff --git a/manim/scene/moving_camera_scene.py b/manim/scene/moving_camera_scene.pyindex 0cbfb06d5..05adc5ae8 100644--- a/manim/scene/moving_camera_scene.py+++ b/manim/scene/moving_camera_scene.py@@ -1,3 +1,5 @@+__all__ = ["MovingCameraScene"]+from ..camera.moving_camera import MovingCamerafrom ..scene.scene import Scenefrom ..utils.iterables import list_updatediff --git a/manim/scene/reconfigurable_scene.py b/manim/scene/reconfigurable_scene.pyindex 082b9bddf..7f5d3c21d 100644--- a/manim/scene/reconfigurable_scene.py+++ b/manim/scene/reconfigurable_scene.py@@ -1,3 +1,5 @@+__all__ = ["ReconfigurableScene"]+from ..animation.transform import Transformfrom ..constants import *from ..mobject.mobject import Mobjectdiff --git a/manim/scene/sample_space_scene.py b/manim/scene/sample_space_scene.pyindex f8abf32fd..f2c5e61bc 100644--- a/manim/scene/sample_space_scene.py+++ b/manim/scene/sample_space_scene.py@@ -1,3 +1,6 @@+__all__ = ["SampleSpaceScene"]++from ..animation.animation import Animationfrom ..animation.transform import MoveToTargetfrom ..animation.transform import Transformdiff --git a/manim/scene/scene.py b/manim/scene/scene.pyindex 217988b28..d3ad0f329 100644--- a/manim/scene/scene.py+++ b/manim/scene/scene.py@@ -1,4 +1,9 @@"""A Scene is the canvas of the animation."""+++__all__ = ["Scene", "EndSceneEarlyException"]++import inspectimport randomimport warningsdiff --git a/manim/scene/scene_file_writer.py b/manim/scene/scene_file_writer.pyindex bd5342b66..6f835fbbb 100644--- a/manim/scene/scene_file_writer.py+++ b/manim/scene/scene_file_writer.py@@ -1,3 +1,6 @@+__all__ = ["SceneFileWriter"]++import numpy as npfrom pydub import AudioSegmentimport shutildiff --git a/manim/scene/three_d_scene.py b/manim/scene/three_d_scene.pyindex 0da81db6a..8b83f7cd7 100644--- a/manim/scene/three_d_scene.py+++ b/manim/scene/three_d_scene.py@@ -1,3 +1,6 @@+__all__ = ["ThreeDScene", "SpecialThreeDScene"]++from ..animation.transform import ApplyMethodfrom ..camera.three_d_camera import ThreeDCamerafrom ..constants import DEGREESdiff --git a/manim/scene/vector_space_scene.py b/manim/scene/vector_space_scene.pyindex b285fcc7c..5f833deee 100644--- a/manim/scene/vector_space_scene.py+++ b/manim/scene/vector_space_scene.py@@ -1,3 +1,6 @@+__all__ = ["VectorScene", "LinearTransformationScene"]++import numpy as npfrom ..animation.animation import Animationdiff --git a/manim/scene/zoomed_scene.py b/manim/scene/zoomed_scene.pyindex f2060978d..27205c8c1 100644--- a/manim/scene/zoomed_scene.py+++ b/manim/scene/zoomed_scene.py@@ -1,3 +1,6 @@+__all__ = ["ZoomedScene"]++from ..animation.transform import ApplyMethodfrom ..camera.moving_camera import MovingCamerafrom ..camera.multi_camera import MultiCameradiff --git a/manim/utils/bezier.py b/manim/utils/bezier.pyindex c86eab566..d9944f783 100644--- a/manim/utils/bezier.py+++ b/manim/utils/bezier.py@@ -1,3 +1,17 @@+__all__ = [+ "bezier",+ "partial_bezier_points",+ "interpolate",+ "integer_interpolate",+ "mid",+ "inverse_interpolate",+ "match_interpolate",+ "get_smooth_handle_points",+ "diag_to_matrix",+ "is_closed",+]++from scipy import linalgimport numpy as npdiff --git a/manim/utils/color.py b/manim/utils/color.pyindex ebae3ddac..271d48372 100644--- a/manim/utils/color.py+++ b/manim/utils/color.py@@ -1,3 +1,22 @@+__all__ = [+ "color_to_rgb",+ "color_to_rgba",+ "rgb_to_color",+ "rgba_to_color",+ "rgb_to_hex",+ "hex_to_rgb",+ "invert_color",+ "color_to_int_rgb",+ "color_to_int_rgba",+ "color_gradient",+ "interpolate_color",+ "average_color",+ "random_bright_color",+ "random_color",+ "get_shaded_rgb",+]++import randomfrom colour import Colordiff --git a/manim/utils/config_ops.py b/manim/utils/config_ops.pyindex ebbf9b9b5..4ffb46ea4 100644--- a/manim/utils/config_ops.py+++ b/manim/utils/config_ops.py@@ -1,3 +1,14 @@+__all__ = [+ "get_all_descendent_classes",+ "filtered_locals",+ "digest_config",+ "merge_dicts_recursively",+ "soft_dict_update",+ "digest_locals",+ "DictAsObject",+]++import inspectimport itertools as itdiff --git a/manim/utils/debug.py b/manim/utils/debug.pyindex e6bfec433..3e615d597 100644--- a/manim/utils/debug.py+++ b/manim/utils/debug.py@@ -1,3 +1,6 @@+__all__ = ["print_family", "get_submobject_index_labels"]++from ..constants import BLACKfrom ..mobject.numbers import Integerfrom ..mobject.types.vectorized_mobject import VGroupdiff --git a/manim/utils/file_ops.py b/manim/utils/file_ops.pyindex b0b9069d3..44e359ed7 100644--- a/manim/utils/file_ops.py+++ b/manim/utils/file_ops.py@@ -1,3 +1,12 @@+__all__ = [+ "add_extension_if_not_present",+ "guarantee_existence",+ "seek_full_path_from_defaults",+ "modify_atime",+ "open_file",+]++import osimport subprocess as spimport platform@@ -32,12 +41,12 @@ def seek_full_path_from_defaults(file_name, default_dir, extensions):def modify_atime(file_path):- """Will manually change the accessed time (called `atime`) of the file, as on a lot of OS the accessed time refresh is disabled by default.+ """Will manually change the accessed time (called `atime`) of the file, as on a lot of OS the accessed time refresh is disabled by default.Parameters----------file_path : :class:`str`- The path of the file.+ The path of the file."""os.utime(file_path, times=(time.time(), os.path.getmtime(file_path)))diff --git a/manim/utils/hashing.py b/manim/utils/hashing.pyindex 563dd330e..454b9b206 100644--- a/manim/utils/hashing.py+++ b/manim/utils/hashing.py@@ -13,11 +13,11 @@ class CustomEncoder(json.JSONEncoder):def default(self, obj):"""This method is used to serialize objects to JSON format.-+If obj is a function, then it will return a dict with two keys : 'code', for the code source, and 'nonlocals' for all nonlocalsvalues. (including nonlocals functions, that will be serialized as this is recursive.)if obj is a np.darray, it converts it into a list.if obj is an object with __dict__ attribute, it returns its __dict__.- Else, will let the JSONEncoder do the stuff, and throw an error if the type is not suitable for JSONEncoder.+ Else, will let the JSONEncoder do the stuff, and throw an error if the type is not suitable for JSONEncoder.Parameters----------@@ -61,7 +61,7 @@ class CustomEncoder(json.JSONEncoder):----------obj : AnyThe obj to be cleaned.-+Returns-------Any@@ -92,7 +92,7 @@ def get_json(obj):Returns-------- :class:`str`+ :class:`str`The flattened object"""return json.dumps(obj, cls=CustomEncoder)@@ -136,7 +136,7 @@ def get_hash_from_play_call(camera_object, animations_list, current_mobjects_lisReturns-------- :class:`str`+ :class:`str`A string concatenation of the respective hashes of `camera_object`, `animations_list` and `current_mobjects_list`, separated by `_`."""camera_json = get_json(get_camera_dict_for_hashing(camera_object))diff --git a/manim/utils/images.py b/manim/utils/images.pyindex 6359d58d4..0e60e1dbf 100644--- a/manim/utils/images.py+++ b/manim/utils/images.py@@ -1,3 +1,6 @@+__all__ = ["get_full_raster_image_path", "drag_pixels", "invert_image"]++import numpy as npimport osdiff --git a/manim/utils/iterables.py b/manim/utils/iterables.pyindex 51995f688..08c81f0d5 100644--- a/manim/utils/iterables.py+++ b/manim/utils/iterables.py@@ -1,3 +1,19 @@+__all__ = [+ "remove_list_redundancies",+ "list_update",+ "list_difference_update",+ "all_elements_are_instances",+ "adjacent_n_tuples",+ "adjacent_pairs",+ "tuplify",+ "stretch_array_to_length",+ "make_even",+ "make_even_by_cycling",+ "remove_nones",+ "concatenate_lists",+]++import itertools as itimport numpy as npdiff --git a/manim/utils/paths.py b/manim/utils/paths.pyindex 861e6095b..d71daeb3d 100644--- a/manim/utils/paths.py+++ b/manim/utils/paths.py@@ -1,3 +1,11 @@+__all__ = [+ "straight_path",+ "path_along_arc",+ "clockwise_path",+ "counterclockwise_path",+]++import numpy as npfrom ..constants import OUTdiff --git a/manim/utils/rate_functions.py b/manim/utils/rate_functions.pyindex 1dc0f4d78..1bb741ed6 100644--- a/manim/utils/rate_functions.py+++ b/manim/utils/rate_functions.py@@ -1,3 +1,21 @@+__all__ = [+ "linear",+ "smooth",+ "rush_into",+ "rush_from",+ "slow_into",+ "double_smooth",+ "there_and_back",+ "there_and_back_with_pause",+ "running_start",+ "not_quite_there",+ "wiggle",+ "squish_rate_func",+ "lingering",+ "exponential_decay",+]++import numpy as npfrom ..utils.bezier import bezierdiff --git a/manim/utils/simple_functions.py b/manim/utils/simple_functions.pyindex 20329e374..dfd5583b3 100644--- a/manim/utils/simple_functions.py+++ b/manim/utils/simple_functions.py@@ -1,3 +1,15 @@+__all__ = [+ "sigmoid",+ "choose_using_cache",+ "choose",+ "get_num_args",+ "get_parameters",+ "clip_in_place",+ "fdiv",+ "binary_search",+]++from functools import reduceimport inspectimport numpy as npdiff --git a/manim/utils/sounds.py b/manim/utils/sounds.pyindex d98ffcf3d..0f30ca949 100644--- a/manim/utils/sounds.py+++ b/manim/utils/sounds.py@@ -1,3 +1,11 @@+__all__ = [+ "play_chord",+ "play_error_sound",+ "play_finish_sound",+ "get_full_sound_file_path",+]++import osfrom ..utils.file_ops import seek_full_path_from_defaultsdiff --git a/manim/utils/space_ops.py b/manim/utils/space_ops.pyindex e56dfa3b0..6569de264 100644--- a/manim/utils/space_ops.py+++ b/manim/utils/space_ops.py@@ -1,3 +1,32 @@+__all__ = [+ "get_norm",+ "quaternion_mult",+ "quaternion_from_angle_axis",+ "angle_axis_from_quaternion",+ "quaternion_conjugate",+ "rotate_vector",+ "thick_diagonal",+ "rotation_matrix",+ "rotation_about_z",+ "z_to_vector",+ "angle_between",+ "angle_of_vector",+ "angle_between_vectors",+ "project_along_vector",+ "normalize",+ "cross",+ "get_unit_normal",+ "compass_directions",+ "complex_to_R3",+ "R3_to_complex",+ "complex_func_to_R3_func",+ "center_of_mass",+ "midpoint",+ "line_intersection",+ "get_winding_number",+]++from functools import reduceimport numpy as npdiff --git a/manim/utils/strings.py b/manim/utils/strings.pyindex e32b6120e..07a0cd79b 100644--- a/manim/utils/strings.py+++ b/manim/utils/strings.py@@ -1,3 +1,13 @@+__all__ = [+ "to_camel_case",+ "initials",+ "camel_case_initials",+ "complex_string",+ "split_string_to_isolate_substrings",+ "split_string_list_to_isolate_substrings",+]++import itertools as itimport reimport stringdiff --git a/manim/utils/tex.py b/manim/utils/tex.pyindex 0c4217644..a4f72b32f 100644--- a/manim/utils/tex.py+++ b/manim/utils/tex.py@@ -1,3 +1,6 @@+__all__ = ["TexTemplateFromFile", "TexTemplate"]++import osfrom ..utils.config_ops import digest_config