Skip to content

Commit f767e8a

Browse files
committed
Add type annotations to manim/camera/multi_camera.py - part 3
1 parent b1a3508 commit f767e8a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

manim/camera/multi_camera.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def update_sub_cameras(self) -> None:
6565
"""Reshape sub_camera pixel_arrays"""
6666
for imfc in self.image_mobjects_from_cameras:
6767
pixel_height, pixel_width = self.pixel_array.shape[:2]
68-
imfc.camera.frame_shape = (
68+
# TODO:
69+
# error: "MovingCamera" has no attribute "frame_shape" [attr-defined]
70+
imfc.camera.frame_shape = ( # type: ignore[attr-defined]
6971
imfc.camera.frame.height,
7072
imfc.camera.frame.width,
7173
)

manim/mobject/types/image_mobject.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from manim.mobject.geometry.shape_matchers import SurroundingRectangle
1515

1616
from ... import config
17+
from ...camera.moving_camera import MovingCamera
1718
from ...constants import *
1819
from ...mobject.mobject import Mobject
1920
from ...utils.bezier import interpolate

mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ ignore_errors = True
6161
[mypy-manim.camera.camera.*]
6262
ignore_errors = False
6363

64+
[mypy-manim.camera.multi_camera.*]
65+
ignore_errors = False
66+
6467
[mypy-manim.cli.*]
6568
ignore_errors = False
6669

0 commit comments

Comments
 (0)