fix(lib): pass skip argument to ManimCE (#524)

* fix(lib): pass skip argument to ManimCE

* fix(lint): make ruff happy
This commit is contained in:
Jérome Eertmans
2025-01-22 21:41:22 +01:00
committed by GitHub
parent 941b895083
commit dbced6e62e
5 changed files with 17 additions and 8 deletions

View File

@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(unreleased)=
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.4.1...HEAD)
(unreleased-fixed)=
### Fixed
- Fixed `start_skip_animations` to actually pass argument to ManimCE,
otherwise video animations were still rendered, just excluded from
the final output.
[#524](https://github.com/jeertmans/manim-slides/pull/524)
(v5.4.1)=
## [v5.4.1](https://github.com/jeertmans/manim-slides/compare/v5.4.0...v5.4.1)

View File

@ -594,9 +594,7 @@ class BaseSlide:
self._skip_animations = True
def stop_skip_animations(self) -> None:
"""
Stop skipping animations.
"""
"""Stop skipping animations."""
self._skip_animations = False
def wipe(

View File

@ -127,7 +127,10 @@ class Slide(BaseSlide, Scene): # type: ignore[misc]
**kwargs: Any,
) -> None:
Scene.next_section(
self, *args, skip_animations=base_slide_config.skip_animations, **kwargs
self,
*args,
skip_animations=base_slide_config.skip_animations | self._skip_animations,
**kwargs,
)
BaseSlide.next_slide.__wrapped__(
self,

View File

@ -87,13 +87,13 @@ class TestBaseSlide:
assert base_slide.wait_time_between_slides == 0.0
def test_skip_animations(self, base_slide: BaseSlide) -> None:
assert base_slide._skip_animations == False
assert not base_slide._skip_animations
def test_start_and_stop_skip_animations(self, base_slide: BaseSlide) -> None:
base_slide.start_skip_animations()
assert base_slide._skip_animations == True
assert base_slide._skip_animations
base_slide.stop_skip_animations()
assert base_slide._skip_animations == False
assert not base_slide._skip_animations
def test_play(self) -> None:
pass # This method should be tested in test_slide.py

2
uv.lock generated
View File

@ -1526,7 +1526,7 @@ wheels = [
[[package]]
name = "manim-slides"
version = "5.4.0"
version = "5.4.1"
source = { editable = "." }
dependencies = [
{ name = "av" },