A community-maintained Python framework for creating mathematical animations.
fix imports, remove __init__.py files, some pep8 linting
Devin Nealafdf907abc07
diff --git a/active_projects/__init__.py b/active_projects/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/active_projects/eola2/__init__.py b/active_projects/eola2/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/active_projects/eop/__init__.py b/active_projects/eop/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/active_projects/eop/chapter0/__init__.py b/active_projects/eop/chapter0/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/active_projects/eop/chapter1/__init__.py b/active_projects/eop/chapter1/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/active_projects/eop/chapter2/__init__.py b/active_projects/eop/chapter2/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/active_projects/eop/reusables/__init__.py b/active_projects/eop/reusables/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/animation/__init__.py b/manimlib/animation/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/animation/composition.py b/manimlib/animation/composition.pyindex b5398e5aa..b5818d215 100644--- a/manimlib/animation/composition.py+++ b/manimlib/animation/composition.py@@ -1,4 +1,3 @@-import itertools as itimport warningsimport numpy as np@@ -104,8 +103,7 @@ class Succession(Animation):self.scene_mobjects_at_time = [None for i in range(self.num_anims + 1)]self.scene_mobjects_at_time[0] = Group()for i in range(self.num_anims):- self.scene_mobjects_at_time[i +- 1] = self.scene_mobjects_at_time[i].copy()+ self.scene_mobjects_at_time[i + 1] = self.scene_mobjects_at_time[i].copy()self.animations[i].clean_up(self.scene_mobjects_at_time[i + 1])self.current_alpha = 0@@ -154,7 +152,7 @@ class Succession(Animation):# self.critical_alphas (which is also 1.0)if not abs(alpha - 1) < 0.001:warnings.warn(- "Rounding error not near alpha=1 in Succession.update_mobject," ++ "Rounding error not near alpha=1 in Succession.update_mobject,""instead alpha = %f" % alpha)print(self.critical_alphas, alpha)diff --git a/manimlib/animation/specialized.py b/manimlib/animation/specialized.pyindex 57f110e0c..e689412f7 100644--- a/manimlib/animation/specialized.py+++ b/manimlib/animation/specialized.py@@ -1,5 +1,3 @@-import numpy as np-from manimlib.animation.composition import LaggedStartfrom manimlib.animation.transform import ApplyMethodfrom manimlib.constants import *diff --git a/manimlib/animation/transform.py b/manimlib/animation/transform.pyindex 76c2f27ce..47ec01f56 100644--- a/manimlib/animation/transform.py+++ b/manimlib/animation/transform.py@@ -118,7 +118,7 @@ class ApplyMethod(Transform):"""if not inspect.ismethod(method):raise Exception(- "Whoops, looks like you accidentally invoked " ++ "Whoops, looks like you accidentally invoked ""the method you want to animate")assert(isinstance(method.__self__, Mobject))diff --git a/manimlib/animation/update.py b/manimlib/animation/update.pyindex 45b26f39a..21626ad35 100644--- a/manimlib/animation/update.py+++ b/manimlib/animation/update.py@@ -36,8 +36,6 @@ class MaintainPositionRelativeTo(Animation):Animation.__init__(self, mobject, **kwargs)def update_mobject(self, alpha):- self.mobject.shift(- self.tracked_mobject.get_critical_point(self.tracked_critical_point) -- self.mobject.get_critical_point(self.tracked_critical_point) +- self.diff- )+ target = self.tracked_mobject.get_critical_point(self.tracked_critical_point)+ location = self.mobject.get_critical_point(self.tracked_critical_point)+ self.mobject.shift(target - location + self.diff)diff --git a/manimlib/camera/__init__.py b/manimlib/camera/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/camera/camera.py b/manimlib/camera/camera.pyindex 519cea649..9e7bcc846 100644--- a/manimlib/camera/camera.py+++ b/manimlib/camera/camera.py@@ -1,4 +1,3 @@-from functools import reduceimport itertools as itimport operator as op@@ -15,7 +14,6 @@ from manimlib.mobject.mobject import Mobjectfrom manimlib.mobject.types.point_cloud_mobject import PMobjectfrom manimlib.mobject.types.vectorized_mobject import VMobjectfrom manimlib.utils.color import color_to_int_rgba-from manimlib.utils.color import rgb_to_hexfrom manimlib.utils.config_ops import digest_configfrom manimlib.utils.images import get_full_raster_image_pathfrom manimlib.utils.iterables import batch_by_propertydiff --git a/manimlib/camera/mapping_camera.py b/manimlib/camera/mapping_camera.pyindex d7347d0c3..d4a0ea154 100644--- a/manimlib/camera/mapping_camera.py+++ b/manimlib/camera/mapping_camera.py@@ -35,6 +35,7 @@ class MappingCamera(Camera):excluded_mobjects=None,)+# Note: This allows layering of multiple cameras onto the same portion of the pixel array,# the later cameras overwriting the former#@@ -42,7 +43,6 @@ class MappingCamera(Camera):# CameraPlusOverlay class)# TODO, the classes below should likely be deleted-class OldMultiCamera(Camera):def __init__(self, *cameras_with_start_positions, **kwargs):self.shifted_cameras = [diff --git a/manimlib/camera/moving_camera.py b/manimlib/camera/moving_camera.pyindex 4bf0fe647..c54a1e6b2 100644--- a/manimlib/camera/moving_camera.py+++ b/manimlib/camera/moving_camera.py@@ -5,7 +5,6 @@ from manimlib.constants import ORIGINfrom manimlib.constants import WHITEfrom manimlib.mobject.frame import ScreenRectanglefrom manimlib.mobject.types.vectorized_mobject import VGroup-from manimlib.mobject.types.vectorized_mobject import VectorizedPointfrom manimlib.utils.config_ops import digest_configdiff --git a/manimlib/camera/three_d_camera.py b/manimlib/camera/three_d_camera.pyindex cf6a1be28..32e30d230 100644--- a/manimlib/camera/three_d_camera.py+++ b/manimlib/camera/three_d_camera.py@@ -7,7 +7,6 @@ from manimlib.mobject.three_d_utils import get_3d_vmob_end_corner_unit_normalfrom manimlib.mobject.three_d_utils import get_3d_vmob_start_cornerfrom manimlib.mobject.three_d_utils import get_3d_vmob_start_corner_unit_normalfrom manimlib.mobject.types.point_cloud_mobject import Point-from manimlib.mobject.types.vectorized_mobject import VMobjectfrom manimlib.mobject.value_tracker import ValueTrackerfrom manimlib.utils.color import get_shaded_rgbfrom manimlib.utils.simple_functions import clip_in_placediff --git a/manimlib/container/__init__.py b/manimlib/container/__init__.pydeleted file mode 100644index 8b1378917..000000000--- a/manimlib/container/__init__.py+++ /dev/null@@ -1 +0,0 @@-diff --git a/manimlib/continual_animation/__init__.py b/manimlib/continual_animation/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/continual_animation/continual_animation.py b/manimlib/continual_animation/continual_animation.pyindex e75f81b61..88f632a50 100644--- a/manimlib/continual_animation/continual_animation.py+++ b/manimlib/continual_animation/continual_animation.py@@ -42,8 +42,7 @@ class ContinualAnimation(object):dt *= float(self.external_time) / self.start_up_timeelif self.external_time > self.end_time - self.wind_down_time:dt *= np.clip(- float(self.end_time - self.external_time) /- self.wind_down_time,+ float(self.end_time - self.external_time) / self.wind_down_time,0, 1)self.internal_time += dtdiff --git a/manimlib/continual_animation/from_animation.py b/manimlib/continual_animation/from_animation.pyindex b49263dcb..2d478d25f 100644--- a/manimlib/continual_animation/from_animation.py+++ b/manimlib/continual_animation/from_animation.py@@ -1,5 +1,3 @@--from manimlib.continual_animation.continual_animation import ContinualAnimationdiff --git a/manimlib/continual_animation/numbers.py b/manimlib/continual_animation/numbers.pyindex 50faa18e9..f8763ec6e 100644--- a/manimlib/continual_animation/numbers.py+++ b/manimlib/continual_animation/numbers.py@@ -1,5 +1,3 @@--from manimlib.animation.numbers import ChangingDecimalfrom manimlib.continual_animation.from_animation import NormalAnimationAsContinualAnimationdiff --git a/manimlib/continual_animation/update.py b/manimlib/continual_animation/update.pyindex 7e97ff96a..c4c551953 100644--- a/manimlib/continual_animation/update.py+++ b/manimlib/continual_animation/update.py@@ -1,5 +1,3 @@--from manimlib.animation.update import MaintainPositionRelativeTofrom manimlib.continual_animation.continual_animation import ContinualAnimationfrom manimlib.mobject.value_tracker import ValueTrackerdiff --git a/manimlib/extract_scene.py b/manimlib/extract_scene.pyindex 8fc0d2819..85f11a28b 100644--- a/manimlib/extract_scene.py+++ b/manimlib/extract_scene.py@@ -1,7 +1,7 @@-import importlibimport inspectimport itertools as itimport os+import platformimport subprocess as spimport sysimport traceback@@ -13,7 +13,6 @@ import manimlib.constantsdef handle_scene(scene, **config):- import platformif config["quiet"]:curr_stdout = sys.stdoutsys.stdout = open(os.devnull, "w")diff --git a/manimlib/for_3b1b_videos/common_scenes.py b/manimlib/for_3b1b_videos/common_scenes.pyindex 6b7dcfaa0..be041d297 100644--- a/manimlib/for_3b1b_videos/common_scenes.py+++ b/manimlib/for_3b1b_videos/common_scenes.py@@ -1,7 +1,5 @@import random-import string-from manimlib.animation.animation import Animationfrom manimlib.animation.composition import LaggedStartfrom manimlib.animation.creation import DrawBorderThenFillfrom manimlib.animation.creation import FadeIndiff --git a/manimlib/for_3b1b_videos/pi_class.py b/manimlib/for_3b1b_videos/pi_class.pyindex fb453af05..77a813e18 100644--- a/manimlib/for_3b1b_videos/pi_class.py+++ b/manimlib/for_3b1b_videos/pi_class.py@@ -1,15 +1,12 @@-import warnings--import numpy as np-from manimlib.constants import *from manimlib.for_3b1b_videos.pi_creature import PiCreaturefrom manimlib.mobject.types.vectorized_mobject import VGroup+class PiCreatureClass(VGroup):CONFIG = {- "width" : 3,- "height" : 2+ "width": 3,+ "height": 2}def __init__(self, **kwargs):@@ -17,7 +14,5 @@ class PiCreatureClass(VGroup):for i in range(self.width):for j in range(self.height):pi = PiCreature().scale(0.3)- pi.move_to(i*DOWN + j* RIGHT)+ pi.move_to(i * DOWN + j * RIGHT)self.add(pi)--diff --git a/manimlib/for_3b1b_videos/pi_creature.py b/manimlib/for_3b1b_videos/pi_creature.pyindex 088960ab3..97052a1fa 100644--- a/manimlib/for_3b1b_videos/pi_creature.py+++ b/manimlib/for_3b1b_videos/pi_creature.py@@ -12,8 +12,6 @@ from manimlib.mobject.svg.tex_mobject import TextMobjectfrom manimlib.mobject.types.vectorized_mobject import VGroupfrom manimlib.mobject.types.vectorized_mobject import VMobjectfrom manimlib.utils.config_ops import digest_config-from manimlib.utils.rate_functions import squish_rate_func-from manimlib.utils.rate_functions import there_and_backfrom manimlib.utils.space_ops import get_normpi_creature_dir_maybe = os.path.join(MEDIA_DIR, "designs", "PiCreature")@@ -60,7 +58,7 @@ class PiCreature(SVGMobject):"%s_%s.svg" % (self.file_name_prefix, mode))SVGMobject.__init__(self, file_name=svg_file, **kwargs)- except:+ except Exception:warnings.warn("No %s design with mode %s" %(self.file_name_prefix, mode))svg_file = os.path.join(diff --git a/manimlib/for_3b1b_videos/pi_creature_animations.py b/manimlib/for_3b1b_videos/pi_creature_animations.pyindex 6f02ca9b2..6fa76f625 100644--- a/manimlib/for_3b1b_videos/pi_creature_animations.py+++ b/manimlib/for_3b1b_videos/pi_creature_animations.py@@ -100,44 +100,23 @@ class RemovePiCreatureBubble(AnimationGroup):surrounding_scene.add(self.pi_creature)-class FlashThroughClass(Animation):CONFIG = {- "highlight_color" : GREEN,+ "highlight_color": GREEN,}- def __init__(self, mobject, mode = "linear", **kwargs):-+ def __init__(self, mobject, mode="linear", **kwargs):if not isinstance(mobject, PiCreatureClass):raise Exception("FlashThroughClass mobject must be a PiCreatureClass")digest_config(self, kwargs)self.indices = list(range(mobject.height * mobject.width))-if mode == "random":np.random.shuffle(self.indices)-Animation.__init__(self, mobject, **kwargs)-def update_mobject(self, alpha):index = int(np.floor(alpha * self.mobject.height * self.mobject.width))-for pi in self.mobject:pi.set_color(BLUE_E)if index < self.mobject.height * self.mobject.width:self.mobject[self.indices[index]].set_color(self.highlight_color)---------------diff --git a/manimlib/for_3b1b_videos/pi_creature_scene.py b/manimlib/for_3b1b_videos/pi_creature_scene.pyindex 1b70bb9f1..a30dcd20a 100644--- a/manimlib/for_3b1b_videos/pi_creature_scene.py+++ b/manimlib/for_3b1b_videos/pi_creature_scene.py@@ -1,8 +1,6 @@import itertools as itimport random-import numpy as np-from manimlib.animation.transform import ApplyMethodfrom manimlib.animation.transform import ReplacementTransformfrom manimlib.animation.transform import Transformdiff --git a/manimlib/mobject/__init__.py b/manimlib/mobject/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/mobject/mobject.py b/manimlib/mobject/mobject.pyindex e707f5d76..49a820389 100644--- a/manimlib/mobject/mobject.py+++ b/manimlib/mobject/mobject.py@@ -19,7 +19,6 @@ from manimlib.utils.iterables import remove_list_redundanciesfrom manimlib.utils.paths import straight_pathfrom manimlib.utils.simple_functions import get_num_argsfrom manimlib.utils.space_ops import angle_of_vector-from manimlib.utils.space_ops import complex_to_R3from manimlib.utils.space_ops import get_normfrom manimlib.utils.space_ops import rotation_matrix@@ -102,7 +101,7 @@ class Mobject(Container):def get_image(self, camera=None):if camera is None:- from camera.camera import Camera+ from manimlib.camera.camera import Cameracamera = Camera()camera.capture_mobject(self)return camera.get_image()diff --git a/manimlib/mobject/svg/__init__.py b/manimlib/mobject/svg/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/mobject/svg/drawings.py b/manimlib/mobject/svg/drawings.pyindex 62e11d8d6..1e22f1078 100644--- a/manimlib/mobject/svg/drawings.py+++ b/manimlib/mobject/svg/drawings.py@@ -544,7 +544,7 @@ class Car(SVGMobject):self.set_stroke(color=WHITE, width=0)self.set_fill(self.color, opacity=1)- from for_3b1b_videos.pi_creature import Randolph+ from manimlib.for_3b1b_videos.pi_creature import Randolphrandy = Randolph(mode="happy")randy.set_height(0.6 * self.get_height())randy.stretch(0.8, 0)diff --git a/manimlib/mobject/types/__init__.py b/manimlib/mobject/types/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/manimlib/mobject/types/vectorized_mobject.py b/manimlib/mobject/types/vectorized_mobject.pyindex efefd65bc..bb9c45112 100644--- a/manimlib/mobject/types/vectorized_mobject.py+++ b/manimlib/mobject/types/vectorized_mobject.py@@ -520,8 +520,8 @@ class VMobject(Mobject):# Each element of index_allocation is like a bucket,# and its value tells you the appropriate index of# the smaller curve.- index_allocation = (np.arange(curr + n - 1) *- num_curves) // (curr + n - 1)+ index_allocation = (+ np.arange(curr + n - 1) * num_curves) // (curr + n - 1)for index in range(num_curves):curr_bezier_points = self.points[3 * index:3 * index + 4]num_inter_curves = sum(index_allocation == index)diff --git a/manimlib/once_useful_constructs/arithmetic.py b/manimlib/once_useful_constructs/arithmetic.pyindex dac1f428d..3720d798f 100644--- a/manimlib/once_useful_constructs/arithmetic.py+++ b/manimlib/once_useful_constructs/arithmetic.py@@ -66,9 +66,7 @@ class RearrangeEquation(Scene):"""num_start_terms = len(start_terms)all_mobs = np.array(- TexMobject(start_terms).split() +- TexMobject(end_terms).split()- )+ TexMobject(start_terms).split() + TexMobject(end_terms).split())all_terms = np.array(start_terms + end_terms)for term in set(all_terms):matches = all_terms == termdiff --git a/manimlib/once_useful_constructs/combinatorics.py b/manimlib/once_useful_constructs/combinatorics.pyindex 2e56f667a..e4fdab29b 100644--- a/manimlib/once_useful_constructs/combinatorics.py+++ b/manimlib/once_useful_constructs/combinatorics.py@@ -7,10 +7,11 @@ from manimlib.utils.simple_functions import chooseDEFAULT_COUNT_NUM_OFFSET = (FRAME_X_RADIUS - 1, FRAME_Y_RADIUS - 1, 0)-DEFAULT_COUNT_RUN_TIME = 5.0+DEFAULT_COUNT_RUN_TIME = 5.0+class CountingScene(Scene):- def count(self, items, item_type = "mobject", *args, **kwargs):+ def count(self, items, item_type="mobject", *args, **kwargs):if item_type == "mobject":self.count_mobjects(items, *args, **kwargs)elif item_type == "region":@@ -20,18 +21,19 @@ class CountingScene(Scene):return selfdef count_mobjects(- self, mobjects, mode = "highlight",- color = "red",- display_numbers = True,- num_offset = DEFAULT_COUNT_NUM_OFFSET,- run_time = DEFAULT_COUNT_RUN_TIME):+ self, mobjects, mode="highlight",+ color="red",+ display_numbers=True,+ num_offset=DEFAULT_COUNT_NUM_OFFSET,+ run_time=DEFAULT_COUNT_RUN_TIME,+ ):"""Note, leaves final number mobject as "number" attributemode can be "highlight", "show_creation" or "show", otherwisea warning is given and nothing is animating during the count"""- if len(mobjects) > 50: #TODO+ if len(mobjects) > 50: # TODOraise Exception("I don't know if you should be counting \too many mobjects...")if len(mobjects) == 0:@@ -52,7 +54,7 @@ class CountingScene(Scene):self.wait(frame_time)mob.set_color(original_color)if mode == "show_creation":- self.play(ShowCreation(mob, run_time = frame_time))+ self.play(ShowCreation(mob, run_time=frame_time))if mode == "show":self.add(mob)self.wait(frame_time)@@ -63,10 +65,10 @@ class CountingScene(Scene):self.number = num_mobreturn self- def count_regions(self, regions,- mode = "one_at_a_time",- num_offset = DEFAULT_COUNT_NUM_OFFSET,- run_time = DEFAULT_COUNT_RUN_TIME,+ def count_regions(self, regions,+ mode="one_at_a_time",+ num_offset=DEFAULT_COUNT_NUM_OFFSET,+ run_time=DEFAULT_COUNT_RUN_TIME,**unused_kwargsn):if mode not in ["one_at_a_time", "show_all"]:raise Warning("Unknown mode")@@ -84,34 +86,34 @@ class CountingScene(Scene):self.number = num_mobreturn self-def combinationMobject(n,k):- return Integer(choose(n,k))++def combinationMobject(n, k):+ return Integer(choose(n, k))class GeneralizedPascalsTriangle(VMobject):CONFIG = {- "nrows" : 7,- "height" : FRAME_HEIGHT - 1,- "width" : 1.5*FRAME_X_RADIUS,- "portion_to_fill" : 0.7,- "submob_class" : combinationMobject,- }+ "nrows": 7,+ "height": FRAME_HEIGHT - 1,+ "width": 1.5 * FRAME_X_RADIUS,+ "portion_to_fill": 0.7,+ "submob_class": combinationMobject,+ }+def generate_points(self):self.cell_height = float(self.height) / self.nrowsself.cell_width = float(self.width) / self.nrows- self.bottom_left = (self.cell_width * self.nrows / 2.0)*LEFT + \- (self.cell_height * self.nrows / 2.0)*DOWN- num_to_num_mob = {}+ self.bottom_left = (self.cell_width * self.nrows / 2.0) * LEFT + \+ (self.cell_height * self.nrows / 2.0) * DOWNself.coords_to_mobs = {}self.coords = [- (n, k)- for n in range(self.nrows)- for k in range(n+1)+ (n, k)+ for n in range(self.nrows)+ for k in range(n + 1)]for n, k in self.coords:- num = choose(n, k)center = self.coords_to_center(n, k)- num_mob = self.submob_class(n,k) #TexMobject(str(num))+ num_mob = self.submob_class(n, k) # TexMobject(str(num))scale_factor = min(1,self.portion_to_fill * self.cell_height / num_mob.get_height(),@@ -122,20 +124,20 @@ class GeneralizedPascalsTriangle(VMobject):self.coords_to_mobs[n] = {}self.coords_to_mobs[n][k] = num_mobself.add(*[- self.coords_to_mobs[n][k]+ self.coords_to_mobs[n][k]for n, k in self.coords])return selfdef coords_to_center(self, n, k):- x_offset = self.cell_width * (k+self.nrows/2.0 - n/2.0)+ x_offset = self.cell_width * (k + self.nrows / 2.0 - n / 2.0)y_offset = self.cell_height * (self.nrows - n)- return self.bottom_left + x_offset*RIGHT + y_offset*UP+ return self.bottom_left + x_offset * RIGHT + y_offset * UPdef generate_n_choose_k_mobs(self):self.coords_to_n_choose_k = {}for n, k in self.coords:- nck_mob = TexMobject(r"{%d \choose %d}"%(n, k))+ nck_mob = TexMobject(r"{%d \choose %d}" % (n, k))scale_factor = min(1,self.portion_to_fill * self.cell_height / nck_mob.get_height(),@@ -162,8 +164,8 @@ class GeneralizedPascalsTriangle(VMobject):zero = TexMobject("0")self.sea_of_zeros = []for n in range(self.nrows):- for a in range((self.nrows - n)/2 + 1):- for k in (n + a + 1, -a -1):+ for a in range((self.nrows - n) / 2 + 1):+ for k in (n + a + 1, -a - 1):self.coords.append((n, k))mob = zero.copy()mob.shift(self.coords_to_center(n, k))@@ -175,20 +177,12 @@ class GeneralizedPascalsTriangle(VMobject):n = self.nrows - 1lowest_row = VGroup(*[self.coords_to_mobs[n][k]- for k in range(n+1)+ for k in range(n + 1)])return lowest_rowclass PascalsTriangle(GeneralizedPascalsTriangle):CONFIG = {- "submob_class" : combinationMobject,+ "submob_class": combinationMobject,}--------diff --git a/manimlib/once_useful_constructs/fractals.py b/manimlib/once_useful_constructs/fractals.pyindex 8b71fad84..3e6276425 100644--- a/manimlib/once_useful_constructs/fractals.py+++ b/manimlib/once_useful_constructs/fractals.py@@ -296,8 +296,8 @@ class JaggedCurvePiece(VMobject):if self.get_num_anchor_points() == 0:self.points = np.zeros((1, 3))anchors = self.get_anchors()- indices = np.linspace(0, len(anchors) - 1, n +- len(anchors)).astype('int')+ indices = np.linspace(0, len(anchors) - 1, n + len(anchors)) \+ .astype('int')self.set_points_as_corners(anchors[indices])diff --git a/manimlib/once_useful_constructs/graph_theory.py b/manimlib/once_useful_constructs/graph_theory.pyindex 775b2286e..890a13aba 100644--- a/manimlib/once_useful_constructs/graph_theory.py+++ b/manimlib/once_useful_constructs/graph_theory.py@@ -13,13 +13,13 @@ from manimlib.utils.space_ops import center_of_massclass Graph():def __init__(self):# List of points in R^3- vertices = []+ # vertices = []# List of pairs of indices of vertices- edges = []+ # edges = []# List of tuples of indices of vertices. The last should# be a cycle whose interior is the entire graph, and when# regions are computed its complement will be taken.- region_cycles = []+ # region_cycles = []self.construct()@@ -275,7 +275,7 @@ class DiscreteGraphScene(Scene):])def trace_cycle(self, cycle=None, color="yellow", run_time=2.0):- if cycle == None:+ if cycle is None:cycle = self.graph.region_cycles[0]time_per_edge = run_time / len(cycle)next_in_cycle = it.cycle(cycle)@@ -385,8 +385,7 @@ class DiscreteGraphScene(Scene):Dot(point).set_color("green")for point in self.dual_points]- self.dual_vertices[-1] = Circle().scale(FRAME_X_RADIUS +- FRAME_Y_RADIUS)+ self.dual_vertices[-1] = Circle().scale(FRAME_X_RADIUS + FRAME_Y_RADIUS)self.dual_points[-1] = point_at_infinityself.dual_edges = []diff --git a/manimlib/once_useful_constructs/light.py b/manimlib/once_useful_constructs/light.pyindex 7294f0976..56f2b6e87 100644--- a/manimlib/once_useful_constructs/light.py+++ b/manimlib/once_useful_constructs/light.py@@ -242,7 +242,7 @@ class Spotlight(VMobject):projected_screen_points = list(map(self.project, screen_points))viewing_angles = np.array(list(map(self.viewing_angle_of_point,- projected_screen_points)))+ projected_screen_points)))lower_angle = upper_angle = 0if len(viewing_angles) != 0:@@ -420,7 +420,7 @@ class LightSource(VMobject):else:# Note: See belowindex = self.submobjects.index(self.spotlight)- camera_mob = self.spotlight.camera_mob+ # camera_mob = self.spotlight.camera_mobself.remove(self.spotlight)self.spotlight = Spotlight(source_point=VectorizedPoint(location=self.get_source_point()),diff --git a/manimlib/once_useful_constructs/region.py b/manimlib/once_useful_constructs/region.pyindex f2f8ae87d..ab76ac10d 100644--- a/manimlib/once_useful_constructs/region.py+++ b/manimlib/once_useful_constructs/region.py@@ -99,7 +99,7 @@ def plane_partition(*lines, **kwargs):def plane_partition_from_points(*points, **kwargs):"""Returns list of regions cut out by the complete graph- with points from the argument as vertices.+ with points from the argument as vertices.Each point comes in the form (x, y)"""diff --git a/manimlib/scene/__init__.py b/manimlib/scene/__init__.pydeleted file mode 100644index 8b1378917..000000000--- a/manimlib/scene/__init__.py+++ /dev/null@@ -1 +0,0 @@-diff --git a/manimlib/scene/graph_scene.py b/manimlib/scene/graph_scene.pyindex 5bdf93c15..0f23ad8b3 100644--- a/manimlib/scene/graph_scene.py+++ b/manimlib/scene/graph_scene.py@@ -440,7 +440,7 @@ class GraphScene(Scene):triangle.move_to(self.coords_to_point(x_val, 0), UP)triangle.set_fill(color, 1)triangle.set_stroke(width=0)- if label == None:+ if label is None:T_label = TexMobject(self.variable_point_label, fill_color=color)else:T_label = TexMobject(label, fill_color=color)diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.pyindex 53b611b77..6c72b545c 100644--- a/manimlib/scene/scene.py+++ b/manimlib/scene/scene.py@@ -2,7 +2,6 @@ from time import sleepimport _thread as threadimport datetimeimport inspect-import itertools as itimport osimport randomimport shutil@@ -26,6 +25,7 @@ from manimlib.utils.output_directory_getters import add_extension_if_not_presentfrom manimlib.utils.output_directory_getters import get_image_output_directoryfrom manimlib.utils.output_directory_getters import get_movie_output_directory+class Scene(Container):CONFIG = {"camera_class": Camera,@@ -274,8 +274,9 @@ class Scene(Container):for list_name in "mobjects", "foreground_mobjects":self.restructure_mobjects(mobjects, list_name, False)- self.continual_animations = [ca for ca in self.continual_animations if ca not in continual_animations and- ca.mobject not in to_remove]+ self.continual_animations = [+ ca for ca in self.continual_animations if ca not in+ continual_animations and ca.mobject not in to_remove]return selfdef restructure_mobjects(@@ -676,7 +677,7 @@ class Scene(Container):anims = []anims.append(Write(eq))for mobject in self.mobjects:- anims.append(ApplyMethod(mobject.shift,2*UP))+ anims.append(ApplyMethod(mobject.shift, 2 * UP))self.play(*anims)diff --git a/manimlib/utils/__init__.py b/manimlib/utils/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/__init__.py b/old_projects/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/basel/__init__.py b/old_projects/basel/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/brachistochrone/__init__.py b/old_projects/brachistochrone/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/eoc/__init__.py b/old_projects/eoc/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/eola/__init__.py b/old_projects/eola/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/hilbert/__init__.py b/old_projects/hilbert/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/nn/__init__.py b/old_projects/nn/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/old_projects/triangle_of_power/__init__.py b/old_projects/triangle_of_power/__init__.pydeleted file mode 100644index e69de29bb..000000000