mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-18 20:02:25 +08:00
chore(lib): Remove old validation check preventing loop=True
with auto_next=True
(#445)
* remove old validation check * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update CHANGELOG.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -262,21 +262,6 @@ class PreSlideConfig(BaseSlideConfig):
|
||||
|
||||
return pre_slide_config
|
||||
|
||||
@model_validator(mode="after")
|
||||
@classmethod
|
||||
def loop_and_auto_next_disallowed(
|
||||
cls, pre_slide_config: "PreSlideConfig"
|
||||
) -> "PreSlideConfig":
|
||||
if pre_slide_config.loop and pre_slide_config.auto_next:
|
||||
raise ValueError(
|
||||
"You cannot have both `loop=True` and `auto_next=True`, "
|
||||
"because a looping slide has no ending. "
|
||||
"This may be supported in the future if "
|
||||
"https://github.com/jeertmans/manim-slides/pull/299 gets merged."
|
||||
)
|
||||
|
||||
return pre_slide_config
|
||||
|
||||
@property
|
||||
def slides_slice(self) -> slice:
|
||||
return slice(self.start_animation, self.end_animation)
|
||||
|
Reference in New Issue
Block a user