Skip to content

Commit

Permalink
add typehint to CairoRenderer.play
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGrace2282 committed Dec 7, 2024
1 parent b150ac7 commit 9c703b3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions manim/renderer/cairo_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@

from .. import config, logger
from ..camera.camera import Camera
from ..mobject.mobject import Mobject
from ..mobject.mobject import Mobject, _AnimationBuilder

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'Mobject' may not be defined if module
manim.mobject.mobject
is imported before module
manim.renderer.cairo_renderer
, as the
definition
of Mobject occurs after the cyclic
import
of manim.renderer.cairo_renderer.
'Mobject' may not be defined if module
manim.mobject.mobject
is imported before module
manim.renderer.cairo_renderer
, as the
definition
of Mobject occurs after the cyclic
import
of manim.renderer.cairo_renderer.

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'_AnimationBuilder' may not be defined if module
manim.mobject.mobject
is imported before module
manim.renderer.cairo_renderer
, as the
definition
of _AnimationBuilder occurs after the cyclic
import
of manim.renderer.cairo_renderer.
'_AnimationBuilder' may not be defined if module
manim.mobject.mobject
is imported before module
manim.renderer.cairo_renderer
, as the
definition
of _AnimationBuilder occurs after the cyclic
import
of manim.renderer.cairo_renderer.
from ..scene.scene_file_writer import SceneFileWriter
from ..utils.exceptions import EndSceneEarlyException
from ..utils.iterables import list_update

if typing.TYPE_CHECKING:
import types
from collections.abc import Iterable
from typing import Any

from manim.animation.animation import Animation
Expand Down Expand Up @@ -60,7 +58,7 @@ def init_scene(self, scene):
def play(
self,
scene: Scene,
*args: Animation | Iterable[Animation] | types.GeneratorType[Animation],
*args: Animation | Mobject | _AnimationBuilder,
**kwargs,
):
# Reset skip_animations to the original state.
Expand Down

0 comments on commit 9c703b3

Please sign in to comment.