Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2af0403
refactor(lib): change how manim API is imported
jeertmans Oct 13, 2023
e0fdac9
chore(lib): delete old files
jeertmans Oct 13, 2023
01aca2f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2023
5ebb61c
Merge remote-tracking branch 'origin/refactor-manim' into refactor-manim
jeertmans Oct 13, 2023
f3ff76e
wip: moving all commands
jeertmans Oct 13, 2023
06ff18f
adding animations
jeertmans Oct 13, 2023
9355e3d
fix tests
jeertmans Oct 13, 2023
2211ac6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2023
dd57527
fix mypy
jeertmans Oct 13, 2023
effcc75
fixes
jeertmans Oct 13, 2023
418f1f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2023
f5f60e7
trying to fix docs
jeertmans Oct 14, 2023
d4a6148
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 14, 2023
1b1d6c5
wip: docs
jeertmans Oct 16, 2023
c803d67
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2023
bccff71
make it work
jeertmans Oct 16, 2023
036a796
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2023
2c3e5cc
wip test
jeertmans Oct 16, 2023
927a489
Merge remote-tracking branch 'origin/refactor-manim' into refactor-manim
jeertmans Oct 16, 2023
fb97409
tests are working
jeertmans Oct 16, 2023
946cb11
improving docs
jeertmans Oct 16, 2023
aa8205a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2023
85ff07e
fix index
jeertmans Oct 16, 2023
b79da53
docs: nicer shift
jeertmans Oct 16, 2023
6c14ee2
docs: nicer quickstart example
jeertmans Oct 16, 2023
95f84ef
fix tests
jeertmans Oct 17, 2023
353a7f4
change tests
jeertmans Oct 17, 2023
7b37c2d
move coverage to test workflow
jeertmans Oct 17, 2023
b182e72
fix(tests): remove resolve
jeertmans Oct 17, 2023
ffe8322
strict resolve
jeertmans Oct 17, 2023
90a2909
change local path test
jeertmans Oct 17, 2023
4c1df69
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2023
f8978c2
documented changes
jeertmans Oct 17, 2023
489ea5b
Merge remote-tracking branch 'origin/refactor-manim' into refactor-manim
jeertmans Oct 17, 2023
c010971
cleanup docs
jeertmans Oct 17, 2023
4d166d5
cleanup files
jeertmans Oct 17, 2023
a767aef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2023
9300811
fix(ci): set type
jeertmans Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix mypy
  • Loading branch information
jeertmans committed Oct 13, 2023
commit dd57527a7ed094b49cd16e3355afbdb0d0f427fd
6 changes: 3 additions & 3 deletions manim_slides/slide/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from manimlib import LEFT, AnimationGroup, FadeIn, FadeOut, Mobject


class Wipe(AnimationGroup):
class Wipe(AnimationGroup): # type: ignore[misc]
"""
Creates a wipe animation that will shift all the current objects and future objects
by a given value.
Expand Down Expand Up @@ -74,7 +74,7 @@ def __init__(
super().__init__(*animations, **kwargs)


class Zoom(AnimationGroup):
class Zoom(AnimationGroup): # type: ignore[misc]
"""
Creates a zoom animation that will fade out all the current objects, and fade in all
the future objects. Objects are faded in a direction that goes towards the camera.
Expand Down Expand Up @@ -121,7 +121,7 @@ def __init__(
fade_in_kwargs: Mapping[str, Any] = {},
fade_out_kwargs: Mapping[str, Any] = {},
**kwargs: Any,
) -> AnimationGroup:
) -> None:
scale_in = 1.0 / scale
scale_out = scale

Expand Down
9 changes: 5 additions & 4 deletions manim_slides/slide/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def mobjects_without_canvas(self) -> Sequence[Mobject]:
"""Returns the list of objects contained in the scene, minus those present in
the canvas."""
return [
mobject for mobject in self.mobjects if mobject not in self.canvas_mobjects
mobject for mobject in self.mobjects if mobject not in self.canvas_mobjects # type: ignore[attr-defined]
]

@property
Expand Down Expand Up @@ -249,7 +249,7 @@ def wait_time_between_slides(self, wait_time: float) -> None:

def play(self, *args: Any, **kwargs: Any) -> None:
"""Overloads `self.play` and increment animation count."""
super().play(*args, **kwargs)
super().play(*args, **kwargs) # type: ignore[misc]
self._current_animation += 1

def next_slide(self) -> None:
Expand Down Expand Up @@ -297,7 +297,7 @@ def construct(self):
), "You cannot call `self.next_slide()` inside a loop"

if self.wait_time_between_slides > 0.0:
self.wait(self.wait_time_between_slides)
self.wait(self.wait_time_between_slides) # type: ignore[attr-defined]

self._slides.append(
PreSlideConfig(
Expand Down Expand Up @@ -486,9 +486,10 @@ def wipe(
[self._frame_width, self._frame_height, 0.0]
)

kwargs.setdefault("shift", shift_amount)

animation = Wipe(
*args,
shift=shift_amount,
**kwargs,
)

Expand Down
4 changes: 2 additions & 2 deletions manim_slides/slide/manim.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .base import Base


class Slide(Base, Scene):
class Slide(Base, Scene): # type: ignore[misc]
"""Inherits from :class:`Scene<manim.scene.scene.Scene>` and provide necessary tools
for slides rendering."""

Expand Down Expand Up @@ -68,7 +68,7 @@ def render(self, *args: Any, **kwargs: Any) -> None:
self._save_slides()


class ThreeDSlide(Slide, ThreeDScene): # type: ignore
class ThreeDSlide(Slide, ThreeDScene): # type: ignore[misc]
"""
Inherits from :class:`Slide` and
:class:`ThreeDScene<manim.scene.three_d_scene.ThreeDScene>` and provide necessary
Expand Down
2 changes: 1 addition & 1 deletion manim_slides/slide/manimgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .base import Base


class Slide(Base, Scene):
class Slide(Base, Scene): # type: ignore[misc]
def __init__(self, *args: Any, **kwargs: Any) -> None:
Path("videos").mkdir(exist_ok=True)
kwargs["file_writer_config"].update(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_slide.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
)
)
@click.pass_context
def manimgl_cli(ctx):
return subprocess.run([sys.executable, "-m", "manimlib", *ctx.args])
def manimgl_cli(ctx: click.Context) -> None:
subprocess.run([sys.executable, "-m", "manimlib", *ctx.args])


cli = pytest.mark.parametrize(
Expand Down