Repository: ManimCommunity/manim
File: manim/mobject/mobject.py (Python)

Code before:
            lambda points: scale_factor * points, about_point, about_edge
        )
        return self

    def rotate_about_origin(self, angle: float, axis: Vector3D = OUT, axes=[]) -> Self:
        """Rotates the :class:`~.Mobject` about the ORIGIN, which is at [0,0,0]."""
        return self.rotate(angle, axis, about_point=ORIGIN)

    def rotate(
        self,
        angle: float,
        axis: Vector3D = OUT,
        about_point: Point3DLike | None = None,
        *,
        about_edge: Vector3D | None = None,
    ) -> Self:
        """Rotates the :class:`~.Mobject` about a certain point."""
        rot_matrix = rotation_matrix(angle, axis)
        self.apply_points_function_about_point(
            lambda points: np.dot(points, rot_matrix.T), about_point, about_edge
        )
        return self

    def flip(
        self,
        axis: Vector3D = UP,
        *,
        about_point: Point3DLike | None = None,
        about_edge: Vector3D | None = None,
    ) -> Self:
        """Flips/Mirrors an mobject about its center.

        Examples
        --------

        .. manim:: FlipExample
            :save_last_frame:

            class FlipExample(Scene):
                def construct(self):
                    s= Line(LEFT, RIGHT+UP).shift(4*LEFT)
                    self.add(s)
                    s2= s.copy().flip()
                    self.add(s2)

        """
        return self.rotate(
            TAU / 2, axis, about_point=about_point, about_edge=about_edge
        )

    def stretch(

Review comment (suggestion):
```suggestion
        axis: Vector3DLike = UP,
```

Code after:
        self.apply_points_function_about_point(
            lambda points: scale_factor * points, about_point, about_edge
        )
        return self

    def rotate_about_origin(self, angle: float, axis: Vector3DLike = OUT) -> Self:
        """Rotates the :class:`~.Mobject` about the ORIGIN, which is at [0,0,0]."""
        return self.rotate(angle, axis, about_point=ORIGIN)

    def rotate(
        self,
        angle: float,
        axis: Vector3DLike = OUT,
        *,
        about_point: Point3DLike | None = None,
        about_edge: Vector3DLike | None = None,
    ) -> Self:
        """Rotates the :class:`~.Mobject` around a specified axis and point.

        Parameters
        ----------
        angle
            The angle of rotation in radians. Predefined constants such as ``DEGREES``
            can also be used to specify the angle in degrees.
        axis
            The rotation axis (see :class:`~.Rotating` for more).
        about_point
            The point about which the mobject rotates. If ``None``, rotation occurs around
            the center of the mobject.
        about_edge
            The edge about which to apply the scaling.

        Returns
        -------
        :class:`Mobject`
            ``self`` (for method chaining)


        .. note::
            To animate a rotation, use :class:`~.Rotating` or :class:`~.Rotate`
            instead of ``.animate.rotate(...)``.
            The ``.animate.rotate(...)`` syntax only applies a transformation
            from the initial state to the final rotated state
            (interpolation between the two states), without showing proper rotational motion
            based on the angle (from 0 to the given angle).

        Examples
        --------

        .. manim:: RotateMethodExample
            :save_last_frame: