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

Typing graphing and camera #4125

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

henrikmidtiby
Copy link
Contributor

Overview: What does this pull request change?

Adding type annotations for files in mobject/graphing/.* and camera/.*

@@ -26,6 +28,12 @@
def __init__(self, custom_labels: bool = False):
self.custom_labels = custom_labels

@overload
def function(self, value: float) -> float: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
def function(self, value: float) -> float: ...

@overload
def function(self, value: np.array) -> np.array: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
@@ -14,6 +14,7 @@
from manim.mobject.geometry.shape_matchers import SurroundingRectangle

from ... import config
from ...camera.moving_camera import MovingCamera

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'MovingCamera' may not be defined if module
manim.camera.moving_camera
is imported before module
manim.mobject.types.image_mobject
, as the
definition
of MovingCamera occurs after the cyclic
import
of manim.mobject.types.image_mobject.
'MovingCamera' may not be defined if module
manim.camera.moving_camera
is imported before module
manim.mobject.types.image_mobject
, as the
definition
of MovingCamera occurs after the cyclic
import
of manim.mobject.types.image_mobject.
'MovingCamera' may not be defined if module
manim.camera.moving_camera
is imported before module
manim.mobject.types.image_mobject
, as the
definition
of MovingCamera occurs after the cyclic
import
of manim.mobject.types.image_mobject.
@henrikmidtiby henrikmidtiby force-pushed the Typing_graphing_and_camera branch from 6b8f27d to f767e8a Compare January 21, 2025 07:21
@@ -29,6 +31,10 @@
from ..utils.iterables import list_difference_update
from ..utils.space_ops import angle_of_vector

if TYPE_CHECKING:
from ..mobject.types.image_mobject import AbstractImageMobject

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'AbstractImageMobject' may not be defined if module
manim.mobject.types.image_mobject
is imported before module
manim.camera.camera
, as the
definition
of AbstractImageMobject occurs after the cyclic
import
of manim.camera.camera.
'AbstractImageMobject' may not be defined if module
manim.mobject.types.image_mobject
is imported before module
manim.camera.camera
, as the
definition
of AbstractImageMobject occurs after the cyclic
import
of manim.camera.camera.
'AbstractImageMobject' may not be defined if module
manim.mobject.types.image_mobject
is imported before module
manim.camera.camera
, as the
definition
of AbstractImageMobject occurs after the cyclic
import
of manim.camera.camera.
'AbstractImageMobject' may not be defined if module
manim.mobject.types.image_mobject
is imported before module
manim.camera.camera
, as the
definition
of AbstractImageMobject occurs after the cyclic
import
of manim.camera.camera.
'AbstractImageMobject' may not be defined if module
manim.mobject.types.image_mobject
is imported before module
manim.camera.camera
, as the
definition
of AbstractImageMobject occurs after the cyclic
import
of manim.camera.camera.
return self.point_to_coords(point)

@staticmethod
def _origin_shift(axis_range: Sequence[float]) -> float: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
from manim.typing import StrPath
from manim.typing import PixelArray, StrPath

from ...camera.moving_camera import MovingCamera

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'MovingCamera' may not be defined if module
manim.camera.moving_camera
is imported before module
manim.mobject.types.image_mobject
, as the
definition
of MovingCamera occurs after the cyclic
import
of manim.mobject.types.image_mobject.
'MovingCamera' may not be defined if module
manim.camera.moving_camera
is imported before module
manim.mobject.types.image_mobject
, as the
definition
of MovingCamera occurs after the cyclic
import
of manim.mobject.types.image_mobject.
'MovingCamera' may not be defined if module
manim.camera.moving_camera
is imported before module
manim.mobject.types.image_mobject
, as the
definition
of MovingCamera occurs after the cyclic
import
of manim.mobject.types.image_mobject.
@henrikmidtiby henrikmidtiby marked this pull request as ready for review January 21, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant