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

Code before:
            # a new path
            self.points = self.points[:-1]
        self.append_points(vectorized_mobject.points)

    def apply_function(
        self,
        function: MappingFunction,
        *,
        about_point: Point3DLike | None = None,
        about_edge: Vector3D | None = None,
    ) -> Self:
        factor = self.pre_function_handle_to_anchor_scale_factor
        self.scale_handle_to_anchor_distances(factor)
        super().apply_function(function)
        self.scale_handle_to_anchor_distances(1.0 / factor)
        if self.make_smooth_after_applying_functions:
            self.make_smooth()
        return self

    def rotate(
        self,
        angle: float,
        axis: Vector3D = OUT,
        about_point: Point3DLike | None = None,
        *,
        about_edge: Vector3D | None = None,
    ) -> Self:
        self.rotate_sheen_direction(angle, axis)
        super().rotate(angle, axis, about_point, about_edge=about_edge)
        return self

    def scale_handle_to_anchor_distances(self, factor: float) -> Self:
        """If the distance between a given handle point H and its associated
        anchor point A is d, then it changes H to be a distances factor*d
        away from A, but so that the line from A to H doesn't change.
        This is mostly useful in the context of applying a (differentiable)
        function, to preserve tangency properties.  One would pull all the
        handles closer to their anchors, apply the function then push them out
        again.

        Parameters
        ----------
        factor
            The factor used for scaling.

        Returns
        -------
        :class:`VMobject`
            ``self``
        """
        for submob in self.family_members_with_points():

Review comment (suggestion):
```suggestion
        about_edge: Vector3DLike | None = None,
```

Code after:
        self.append_points(vectorized_mobject.points)

    def apply_function(
        self,
        function: MappingFunction,
        *,
        about_point: Point3DLike | None = None,
        about_edge: Vector3DLike | None = None,
    ) -> Self:
        factor = self.pre_function_handle_to_anchor_scale_factor
        self.scale_handle_to_anchor_distances(factor)
        super().apply_function(function)
        self.scale_handle_to_anchor_distances(1.0 / factor)
        if self.make_smooth_after_applying_functions:
            self.make_smooth()
        return self

    def rotate(
        self,
        angle: float,
        axis: Vector3DLike = OUT,
        *,
        about_point: Point3DLike | None = None,
        about_edge: Vector3DLike | None = None,
    ) -> Self:
        self.rotate_sheen_direction(angle, axis)
        super().rotate(angle, axis, about_point=about_point, about_edge=about_edge)
        return self

    def scale_handle_to_anchor_distances(self, factor: float) -> Self:
        """If the distance between a given handle point H and its associated
        anchor point A is d, then it changes H to be a distances factor*d
        away from A, but so that the line from A to H doesn't change.
        This is mostly useful in the context of applying a (differentiable)
        function, to preserve tangency properties.  One would pull all the
        handles closer to their anchors, apply the function then push them out
        again.

        Parameters
        ----------
        factor
            The factor used for scaling.

        Returns
        -------
        :class:`VMobject`
            ``self``
        """
        for submob in self.family_members_with_points():
            if len(submob.points) < self.n_points_per_cubic_curve:
                # The case that a bezier quad is not complete (there is no bezier curve as there is not enough control points.)