Skip to content

Commit 7dee3ba

Browse files
committed
# run black everywhere
1 parent 345f6fa commit 7dee3ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+222
-739
lines changed

logo/logo.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55

66
class Thumbnail(GraphScene):
7-
CONFIG = {
8-
"y_max": 8,
9-
"y_axis_height": 5,
10-
}
7+
CONFIG = {"y_max": 8, "y_axis_height": 5}
118

129
def construct(self):
1310
self.show_function_graph()
@@ -98,7 +95,7 @@ def get_h_line(input_tracker):
9895
graph_dot_p2.move_to(get_graph_point(input_tracker_p2))
9996

10097
#
101-
self.play(ShowCreation(graph),)
98+
self.play(ShowCreation(graph))
10299
# Animacion del punto a
103100
self.add_foreground_mobject(graph_dot_p1)
104101
self.add_foreground_mobject(graph_dot_p2)
@@ -150,16 +147,11 @@ def get_h_line(input_tracker):
150147
)
151148

152149
self.add(
153-
input_triangle_p2, graph_dot_p2, v_line_p2, h_line_p2, output_triangle_p2,
150+
input_triangle_p2, graph_dot_p2, v_line_p2, h_line_p2, output_triangle_p2
154151
)
155152
self.play(FadeIn(grupo_secante))
156153

157-
kwargs = {
158-
"x_min": 4,
159-
"x_max": 9,
160-
"fill_opacity": 0.75,
161-
"stroke_width": 0.25,
162-
}
154+
kwargs = {"x_min": 4, "x_max": 9, "fill_opacity": 0.75, "stroke_width": 0.25}
163155
self.graph = graph
164156
iteraciones = 6
165157

manim/animation/composition.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ def interpolate(self, alpha):
100100

101101

102102
class Succession(AnimationGroup):
103-
CONFIG = {
104-
"lag_ratio": 1,
105-
}
103+
CONFIG = {"lag_ratio": 1}
106104

107105
def begin(self):
108106
assert len(self.animations) > 0
@@ -127,15 +125,11 @@ def interpolate(self, alpha):
127125

128126

129127
class LaggedStart(AnimationGroup):
130-
CONFIG = {
131-
"lag_ratio": DEFAULT_LAGGED_START_LAG_RATIO,
132-
}
128+
CONFIG = {"lag_ratio": DEFAULT_LAGGED_START_LAG_RATIO}
133129

134130

135131
class LaggedStartMap(LaggedStart):
136-
CONFIG = {
137-
"run_time": 2,
138-
}
132+
CONFIG = {"run_time": 2}
139133

140134
def __init__(self, AnimationClass, mobject, arg_creator=None, **kwargs):
141135
args_list = []

manim/animation/creation.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ def get_bounds(self, alpha):
4141

4242

4343
class ShowCreation(ShowPartial):
44-
CONFIG = {
45-
"lag_ratio": 1,
46-
}
44+
CONFIG = {"lag_ratio": 1}
4745

4846
def get_bounds(self, alpha):
4947
return (0, alpha)
@@ -127,10 +125,7 @@ def set_default_config_from_length(self, mobject):
127125

128126

129127
class ShowIncreasingSubsets(Animation):
130-
CONFIG = {
131-
"suspend_mobject_updating": False,
132-
"int_func": np.floor,
133-
}
128+
CONFIG = {"suspend_mobject_updating": False, "int_func": np.floor}
134129

135130
def __init__(self, group, **kwargs):
136131
self.all_submobs = list(group.submobjects)
@@ -167,9 +162,7 @@ def __init__(self, text, **kwargs):
167162

168163

169164
class ShowSubmobjectsOneByOne(ShowIncreasingSubsets):
170-
CONFIG = {
171-
"int_func": np.ceil,
172-
}
165+
CONFIG = {"int_func": np.ceil}
173166

174167
def __init__(self, group, **kwargs):
175168
new_group = Group(*group)

manim/animation/fading.py

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030

3131

3232
class FadeOut(Transform):
33-
CONFIG = {
34-
"remover": True,
35-
"lag_ratio": DEFAULT_FADE_LAG_RATIO,
36-
}
33+
CONFIG = {"remover": True, "lag_ratio": DEFAULT_FADE_LAG_RATIO}
3734

3835
def create_target(self):
3936
return self.mobject.copy().fade(1)
@@ -44,9 +41,7 @@ def clean_up_from_scene(self, scene=None):
4441

4542

4643
class FadeIn(Transform):
47-
CONFIG = {
48-
"lag_ratio": DEFAULT_FADE_LAG_RATIO,
49-
}
44+
CONFIG = {"lag_ratio": DEFAULT_FADE_LAG_RATIO}
5045

5146
def create_target(self):
5247
return self.mobject
@@ -61,10 +56,7 @@ def create_starting_mobject(self):
6156

6257

6358
class FadeInFrom(Transform):
64-
CONFIG = {
65-
"direction": DOWN,
66-
"lag_ratio": DEFAULT_ANIMATION_LAG_RATIO,
67-
}
59+
CONFIG = {"direction": DOWN, "lag_ratio": DEFAULT_ANIMATION_LAG_RATIO}
6860

6961
def __init__(self, mobject, direction=None, **kwargs):
7062
if direction is not None:
@@ -86,10 +78,7 @@ class FadeInFromDown(FadeInFrom):
8678
communicates the default
8779
"""
8880

89-
CONFIG = {
90-
"direction": DOWN,
91-
"lag_ratio": DEFAULT_ANIMATION_LAG_RATIO,
92-
}
81+
CONFIG = {"direction": DOWN, "lag_ratio": DEFAULT_ANIMATION_LAG_RATIO}
9382

9483
def __init__(self, mobject, **kwargs):
9584
super().__init__(mobject, direction=DOWN, **kwargs)
@@ -99,9 +88,7 @@ def __init__(self, mobject, **kwargs):
9988

10089

10190
class FadeOutAndShift(FadeOut):
102-
CONFIG = {
103-
"direction": DOWN,
104-
}
91+
CONFIG = {"direction": DOWN}
10592

10693
def __init__(self, mobject, direction=None, **kwargs):
10794
if direction is not None:
@@ -120,9 +107,7 @@ class FadeOutAndShiftDown(FadeOutAndShift):
120107
communicates the default
121108
"""
122109

123-
CONFIG = {
124-
"direction": DOWN,
125-
}
110+
CONFIG = {"direction": DOWN}
126111

127112
def __init__(self, mobject, **kwargs):
128113
super().__init__(mobject, direction=DOWN, **kwargs)
@@ -144,9 +129,7 @@ def create_starting_mobject(self):
144129

145130

146131
class FadeInFromLarge(FadeIn):
147-
CONFIG = {
148-
"scale_factor": 2,
149-
}
132+
CONFIG = {"scale_factor": 2}
150133

151134
def __init__(self, mobject, scale_factor=2, **kwargs):
152135
if scale_factor is not None:
@@ -164,9 +147,7 @@ class VFadeIn(Animation):
164147
VFadeIn and VFadeOut only work for VMobjects,
165148
"""
166149

167-
CONFIG = {
168-
"suspend_mobject_updating": False,
169-
}
150+
CONFIG = {"suspend_mobject_updating": False}
170151

171152
def interpolate_submobject(self, submob, start, alpha):
172153
submob.set_stroke(opacity=interpolate(0, start.get_stroke_opacity(), alpha))
@@ -181,7 +162,4 @@ def interpolate_submobject(self, submob, start, alpha):
181162

182163

183164
class VFadeInThenOut(VFadeIn):
184-
CONFIG = {
185-
"rate_func": there_and_back,
186-
"remover": True,
187-
}
165+
CONFIG = {"rate_func": there_and_back, "remover": True}

manim/animation/growing.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515

1616
class GrowFromPoint(Transform):
17-
CONFIG = {
18-
"point_color": None,
19-
}
17+
CONFIG = {"point_color": None}
2018

2119
def __init__(self, mobject, point, **kwargs):
2220
self.point = point
@@ -53,6 +51,4 @@ def __init__(self, arrow, **kwargs):
5351

5452

5553
class SpinInFromNothing(GrowFromCenter):
56-
CONFIG = {
57-
"path_arc": PI,
58-
}
54+
CONFIG = {"path_arc": PI}

manim/animation/indication.py

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,7 @@
4444

4545

4646
class FocusOn(Transform):
47-
CONFIG = {
48-
"opacity": 0.2,
49-
"color": GREY,
50-
"run_time": 2,
51-
"remover": True,
52-
}
47+
CONFIG = {"opacity": 0.2, "color": GREY, "run_time": 2, "remover": True}
5348

5449
def __init__(self, focus_point, **kwargs):
5550
self.focus_point = focus_point
@@ -73,11 +68,7 @@ def create_starting_mobject(self):
7368

7469

7570
class Indicate(Transform):
76-
CONFIG = {
77-
"rate_func": there_and_back,
78-
"scale_factor": 1.2,
79-
"color": YELLOW,
80-
}
71+
CONFIG = {"rate_func": there_and_back, "scale_factor": 1.2, "color": YELLOW}
8172

8273
def create_target(self):
8374
target = self.mobject.copy()
@@ -101,11 +92,7 @@ def __init__(self, point, color=YELLOW, **kwargs):
10192
digest_config(self, kwargs)
10293
self.lines = self.create_lines()
10394
animations = self.create_line_anims()
104-
super().__init__(
105-
*animations,
106-
group=self.lines,
107-
**kwargs,
108-
)
95+
super().__init__(*animations, group=self.lines, **kwargs)
10996

11097
def create_lines(self):
11198
lines = VGroup()
@@ -127,9 +114,7 @@ class CircleIndicate(Indicate):
127114
CONFIG = {
128115
"rate_func": there_and_back,
129116
"remover": True,
130-
"circle_config": {
131-
"color": YELLOW,
132-
},
117+
"circle_config": {"color": YELLOW},
133118
}
134119

135120
def __init__(self, mobject, **kwargs):
@@ -148,10 +133,7 @@ def interpolate_mobject(self, alpha):
148133

149134

150135
class ShowPassingFlash(ShowPartial):
151-
CONFIG = {
152-
"time_width": 0.1,
153-
"remover": True,
154-
}
136+
CONFIG = {"time_width": 0.1, "remover": True}
155137

156138
def get_bounds(self, alpha):
157139
tw = self.time_width
@@ -168,16 +150,11 @@ def finish(self):
168150

169151

170152
class ShowCreationThenDestruction(ShowPassingFlash):
171-
CONFIG = {
172-
"time_width": 2.0,
173-
"run_time": 1,
174-
}
153+
CONFIG = {"time_width": 2.0, "run_time": 1}
175154

176155

177156
class ShowCreationThenFadeOut(Succession):
178-
CONFIG = {
179-
"remover": True,
180-
}
157+
CONFIG = {"remover": True}
181158

182159
def __init__(self, mobject, **kwargs):
183160
super().__init__(ShowCreation(mobject), FadeOut(mobject), **kwargs)
@@ -201,9 +178,7 @@ def __init__(self, mobject, **kwargs):
201178
rect = self.get_rect()
202179
rect.add_updater(lambda r: r.move_to(mobject))
203180

204-
super().__init__(
205-
self.rect_animation(rect, **kwargs),
206-
)
181+
super().__init__(self.rect_animation(rect, **kwargs))
207182

208183
def get_rect(self):
209184
return SurroundingRectangle(
@@ -224,11 +199,7 @@ class ShowCreationThenFadeAround(AnimationOnSurroundingRectangle):
224199

225200

226201
class ApplyWave(Homotopy):
227-
CONFIG = {
228-
"direction": UP,
229-
"amplitude": 0.2,
230-
"run_time": 1,
231-
}
202+
CONFIG = {"direction": UP, "amplitude": 0.2, "run_time": 1}
232203

233204
def __init__(self, mobject, **kwargs):
234205
digest_config(self, kwargs, locals())
@@ -276,9 +247,7 @@ def interpolate_submobject(self, submobject, starting_sumobject, alpha):
276247

277248

278249
class TurnInsideOut(Transform):
279-
CONFIG = {
280-
"path_arc": TAU / 4,
281-
}
250+
CONFIG = {"path_arc": TAU / 4}
282251

283252
def create_target(self):
284253
return self.mobject.copy().reverse_points()

manim/animation/movement.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515

1616
class Homotopy(Animation):
17-
CONFIG = {
18-
"run_time": 3,
19-
"apply_function_kwargs": {},
20-
}
17+
CONFIG = {"run_time": 3, "apply_function_kwargs": {}}
2118

2219
def __init__(self, homotopy, mobject, **kwargs):
2320
"""
@@ -57,11 +54,7 @@ def homotopy(x, y, z, t):
5754

5855

5956
class PhaseFlow(Animation):
60-
CONFIG = {
61-
"virtual_time": 1,
62-
"rate_func": linear,
63-
"suspend_mobject_updating": False,
64-
}
57+
CONFIG = {"virtual_time": 1, "rate_func": linear, "suspend_mobject_updating": False}
6558

6659
def __init__(self, function, mobject, **kwargs):
6760
self.function = function
@@ -75,9 +68,7 @@ def interpolate_mobject(self, alpha):
7568

7669

7770
class MoveAlongPath(Animation):
78-
CONFIG = {
79-
"suspend_mobject_updating": False,
80-
}
71+
CONFIG = {"suspend_mobject_updating": False}
8172

8273
def __init__(self, mobject, path, **kwargs):
8374
self.path = path

manim/animation/numbers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212

1313
class ChangingDecimal(Animation):
14-
CONFIG = {
15-
"suspend_mobject_updating": False,
16-
}
14+
CONFIG = {"suspend_mobject_updating": False}
1715

1816
def __init__(self, decimal_mob, number_update_func, **kwargs):
1917
self.check_validity_of_input(decimal_mob)

manim/animation/rotation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ def interpolate_mobject(self, alpha):
3232

3333

3434
class Rotate(Transform):
35-
CONFIG = {
36-
"about_point": None,
37-
"about_edge": None,
38-
}
35+
CONFIG = {"about_point": None, "about_edge": None}
3936

4037
def __init__(self, mobject, angle=PI, axis=OUT, **kwargs):
4138
if "path_arc" not in kwargs:

0 commit comments

Comments
 (0)