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

Code before:
    def set_angle(self, angle):
        return self.rotate(angle - self.get_angle(), about_point=self.get_start())

    def set_length(self, length):
        return self.scale(length / self.get_length())

    def set_opacity(self, opacity, family=True):
        # Overwrite default, which would set
        # the fill opacity
        self.set_stroke(opacity=opacity)
        if family:
            for sm in self.submobjects:
                sm.set_opacity(opacity, family)
        return self


class DashedLine(Line):
    """A dashed :class:`Line`.

    Parameters
    ----------
    args : Any
        Arguments to be passed to :class:`Line`
    dash_length : :class:`float`, optional
        The length of each individual dash of the line.
    dash_spacing : Optional[:class:`float]
        No purpose.
    positive_space_ratio : :class:`float`, optional
        The ratio of empty space to dash space. Range of 0-1.
    kwargs : Any
        Additional arguments to be passed to :class:`Line`

    Examples
    --------
    .. manim:: DashedLineExample
        :save_last_frame:

        class DashedLineExample(Scene):
            def construct(self):
                dashed_1 = DashedLine(config.left_side, config.right_side, dash_length=2.0).shift(UP*2)
                dashed_2 = DashedLine(config.left_side, config.right_side)
                dashed_3 = DashedLine(config.left_side, config.right_side, positive_space_ratio=0.1).shift(DOWN*2)
                self.add(dashed_1, dashed_2, dashed_3)

    See Also
    --------
    :class:`~.DashedVMobject`
    """

    def __init__(
        self,

Review comment (suggestion):
```suggestion
    dash_spacing : Optional[:class:`float`]
```

Code after:
    def set_angle(self, angle):
        return self.rotate(angle - self.get_angle(), about_point=self.get_start())

    def set_length(self, length):
        return self.scale(length / self.get_length())

    def set_opacity(self, opacity, family=True):
        # Overwrite default, which would set
        # the fill opacity
        self.set_stroke(opacity=opacity)
        if family:
            for sm in self.submobjects:
                sm.set_opacity(opacity, family)
        return self


class DashedLine(Line):
    """A dashed :class:`Line`.

    Parameters
    ----------
    args : Any
        Arguments to be passed to :class:`Line`
    dash_length : :class:`float`, optional
        The length of each individual dash of the line.
    dash_spacing : Optional[:class:`float`]
        No purpose.
    positive_space_ratio : :class:`float`, optional
        The ratio of empty space to dash space. Range of 0-1.
    kwargs : Any
        Additional arguments to be passed to :class:`Line`

    Examples
    --------
    .. manim:: DashedLineExample
        :save_last_frame:

        class DashedLineExample(Scene):
            def construct(self):
                # dash_length increased
                dashed_1 = DashedLine(config.left_side, config.right_side, dash_length=2.0).shift(UP*2)
                # normal
                dashed_2 = DashedLine(config.left_side, config.right_side)
                # positive_space_ratio decreased
                dashed_3 = DashedLine(config.left_side, config.right_side, positive_space_ratio=0.1).shift(DOWN*2)
                self.add(dashed_1, dashed_2, dashed_3)

    See Also
    --------
    :class:`~.DashedVMobject`
    """