Skip to content

Commit 2d88ea6

Browse files
Merge branch 'main' into dependabot/github_actions/FedericoCarboni/setup-ffmpeg-3
2 parents 5ad0c58 + 294313d commit 2d88ea6

File tree

35 files changed

+428
-381
lines changed

35 files changed

+428
-381
lines changed

.flake8

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Exclude the grpc generated code
33
exclude = ./manim/grpc/gen/*, __pycache__,.git,
44
per-file-ignores = __init__.py:F401
5-
max-complexity = 15
5+
max-complexity = 29
66
max-line-length = 88
77
statistics = True
88
# Prevents some flake8-rst-docstrings errors
@@ -27,9 +27,6 @@ extend-ignore = E203, W503, D202, D212, D213, D404
2727
# Plug-in: flake8-simplify
2828
SIM105, SIM106, SIM119,
2929

30-
# Plug-in: flake8-comprehensions
31-
C901
32-
3330
# Plug-in: flake8-pytest-style
3431
PT001, PT004, PT006, PT011, PT018, PT022, PT023,
3532

LICENSE.community

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021, the Manim Community Developers
3+
Copyright (c) 2024, the Manim Community Developers
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/source/contributing/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ For first-time contributors
6262
managing virtual environments.
6363

6464
If you choose to use Poetry as well, follow `Poetry's installation
65-
guidelines <https://python-poetry.org/docs/master/#installation>`__
65+
guidelines <https://python-poetry.org/docs/master/#installing-with-pipx>`__
6666
to install it on your system, then run ``poetry install`` from
6767
your cloned repository. Poetry will then install Manim, as well
6868
as create and enter a virtual environment. You can always re-enter

docs/source/contributing/docs/typings.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Typing guidelines
115115
from typing import TYPE_CHECKING
116116
117117
if TYPE_CHECKING:
118-
from manim.typing import Vector3
119-
# type stuff with Vector3
118+
from manim.typing import Vector3D
119+
# type stuff with Vector3D
120120
121121
Missing Sections for typehints are:
122122
-----------------------------------

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ in the right place!
3030
You can also find information on Manim's docker images and (online)
3131
notebook environments there.
3232
- Want to try the library before installing it? Take a look at our
33-
interactive online playground at https://try.manim.community in form
33+
interactive online playground at https://try.manim.community in the form
3434
of a Jupyter notebook.
3535
- In our :doc:`Tutorials <tutorials/index>` section you will find a
3636
collection of resources that will teach you how to use Manim. In particular,
@@ -71,7 +71,7 @@ Here are some short summaries for all of the sections in this documentation:
7171
can be found in the :doc:`FAQ </faq/index>` section.
7272
- The :doc:`Reference Manual </reference>` contains a comprehensive list of all of Manim's
7373
(documented) modules, classes, and functions. If you are somewhat familiar with Manim's
74-
module structure feel free to browse the manual directly. If you are searching for
74+
module structure, feel free to browse the manual directly. If you are searching for
7575
something specific, feel free to use the documentation's search feature in the sidebar.
7676
Many classes and methods come with their own illustrated examples too!
7777
- The :doc:`Plugins </plugins>` page documents how to install, write, and distribute

docs/source/installation/jupyter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ then execute it.
7171
texlive-latex-recommended texlive-science \
7272
tipa libpango1.0-dev
7373
!pip install manim
74-
!pip install IPython --upgrade
74+
!pip install IPython==8.21.0
7575
7676
You should start to see Colab installing all the dependencies specified
7777
in these commands. After the execution has completed, you will be prompted

docs/source/plugins.rst

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -99,40 +99,18 @@ directory structure, build system, and naming are completely up to your
9999
discretion as an author. The aforementioned template plugin is only a model
100100
using Poetry since this is the build system Manim uses. The plugin's `entry
101101
point <https://packaging.python.org/specifications/entry-points/>`_ can be
102-
specified in poetry as:
102+
specified in Poetry as:
103103

104104
.. code-block:: toml
105105
106106
[tool.poetry.plugins."manim.plugins"]
107107
"name" = "object_reference"
108108
109-
Here ``name`` is the name of the module of the plugin.
109+
.. versionremoved:: 0.19.0
110110

111-
Here ``object_reference`` can point to either a function in a module or a module
112-
itself. For example,
113-
114-
.. code-block:: toml
115-
116-
[tool.poetry.plugins."manim.plugins"]
117-
"manim_plugintemplate" = "manim_plugintemplate"
118-
119-
Here a module is used as ``object_reference``, and when this plugin is enabled,
120-
Manim will look for ``__all__`` keyword defined in ``manim_plugintemplate`` and
121-
everything as a global variable one by one.
122-
123-
If ``object_reference`` is a function, Manim calls the function and expects the
124-
function to return a list of modules or functions that need to be defined globally.
125-
126-
For example,
127-
128-
.. code-block:: toml
129-
130-
[tool.poetry.plugins."manim.plugins"]
131-
"manim_plugintemplate" = "manim_awesomeplugin.imports:setup_things"
132-
133-
Here, Manim will call the function ``setup_things`` defined in
134-
``manim_awesomeplugin.imports`` and calls that. It returns a list of function or
135-
modules which will be imported globally.
111+
Plugins should be imported explicitly to be usable in user code. The plugin
112+
system will probably be refactored in the future to provide a more structured
113+
interface.
136114

137115
A note on Renderer Compatibility
138116
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

manim/__main__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
import sys
4-
53
import click
64
import cloup
75

manim/animation/indication.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def construct(self):
3131
"Flash",
3232
"ShowPassingFlash",
3333
"ShowPassingFlashWithThinningStrokeWidth",
34-
"ShowCreationThenFadeOut",
3534
"ApplyWave",
3635
"Circumscribe",
3736
"Wiggle",
@@ -148,7 +147,7 @@ def construct(self):
148147

149148
def __init__(
150149
self,
151-
mobject: "Mobject",
150+
mobject: Mobject,
152151
scale_factor: float = 1.2,
153152
color: str = YELLOW,
154153
rate_func: Callable[[float, Optional[float]], np.ndarray] = there_and_back,
@@ -158,7 +157,7 @@ def __init__(
158157
self.scale_factor = scale_factor
159158
super().__init__(mobject, rate_func=rate_func, **kwargs)
160159

161-
def create_target(self) -> "Mobject":
160+
def create_target(self) -> Mobject:
162161
target = self.mobject.copy()
163162
target.scale(self.scale_factor)
164163
target.set_color(self.color)
@@ -342,16 +341,6 @@ def __init__(self, vmobject, n_segments=10, time_width=0.1, remover=True, **kwar
342341
)
343342

344343

345-
@deprecated(
346-
since="v0.15.0",
347-
until="v0.16.0",
348-
message="Use Create then FadeOut to achieve this effect.",
349-
)
350-
class ShowCreationThenFadeOut(Succession):
351-
def __init__(self, mobject: "Mobject", remover: bool = True, **kwargs) -> None:
352-
super().__init__(Create(mobject), FadeOut(mobject), remover=remover, **kwargs)
353-
354-
355344
class ApplyWave(Homotopy):
356345
"""Send a wave through the Mobject distorting it temporarily.
357346
@@ -397,7 +386,7 @@ def construct(self):
397386

398387
def __init__(
399388
self,
400-
mobject: "Mobject",
389+
mobject: Mobject,
401390
direction: np.ndarray = UP,
402391
amplitude: float = 0.2,
403392
wave_func: Callable[[float], float] = smooth,
@@ -516,7 +505,7 @@ def construct(self):
516505

517506
def __init__(
518507
self,
519-
mobject: "Mobject",
508+
mobject: Mobject,
520509
scale_value: float = 1.1,
521510
rotation_angle: float = 0.01 * TAU,
522511
n_wiggles: int = 6,
@@ -544,8 +533,8 @@ def get_rotate_about_point(self) -> np.ndarray:
544533

545534
def interpolate_submobject(
546535
self,
547-
submobject: "Mobject",
548-
starting_submobject: "Mobject",
536+
submobject: Mobject,
537+
starting_submobject: Mobject,
549538
alpha: float,
550539
) -> None:
551540
submobject.points[:, :] = starting_submobject.points

manim/mobject/geometry/line.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from typing import TYPE_CHECKING
1818

1919
import numpy as np
20-
from typing_extensions import Self
2120

2221
from manim import config
2322
from manim.constants import *
@@ -31,6 +30,8 @@
3130
from manim.utils.space_ops import angle_of_vector, line_intersection, normalize
3231

3332
if TYPE_CHECKING:
33+
from typing_extensions import Self
34+
3435
from manim.typing import Point2D, Point3D, Vector3D
3536
from manim.utils.color import ParsableManimColor
3637

@@ -659,7 +660,9 @@ def construct(self):
659660
self.add(plane, vector_1, vector_2)
660661
"""
661662

662-
def __init__(self, direction: Vector3D = RIGHT, buff: float = 0, **kwargs) -> None:
663+
def __init__(
664+
self, direction: Point2D | Point3D = RIGHT, buff: float = 0, **kwargs
665+
) -> None:
663666
self.buff = buff
664667
if len(direction) == 2:
665668
direction = np.hstack([direction, 0])

0 commit comments

Comments
 (0)