Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type hints to scene_file_writer.py, section.py, zoomed_scene.py #4133

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions manim/scene/moving_camera_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ def create_scene(number):

__all__ = ["MovingCameraScene"]

from typing import Any

from manim.animation.animation import Animation
from manim.mobject.mobject import Mobject

from ..camera.moving_camera import MovingCamera
from ..scene.scene import Scene
Expand All @@ -111,10 +114,12 @@ class MovingCameraScene(Scene):
:class:`.MovingCamera`
"""

def __init__(self, camera_class=MovingCamera, **kwargs):
def __init__(
self, camera_class: type[MovingCamera] = MovingCamera, **kwargs: Any
) -> None:
super().__init__(camera_class=camera_class, **kwargs)

def get_moving_mobjects(self, *animations: Animation):
def get_moving_mobjects(self, *animations: Animation) -> list[Mobject]:
"""
This method returns a list of all of the Mobjects in the Scene that
are moving, that are also in the animations passed.
Expand Down
Loading
Loading