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

Code before:
        self.shift(self.arc_center)

    init_points = generate_points


class Line(TipableVMobject):
    def __init__(self, start=LEFT, end=RIGHT, buff=0, path_arc=None, **kwargs):
        self.dim = 3
        self.buff = buff
        self.path_arc = path_arc
        self.set_start_and_end_attrs(start, end)
        super().__init__(**kwargs)

    def generate_points(self):
        self.set_points_by_ends(
            start=self.start, end=self.end, buff=self.buff, path_arc=self.path_arc
        )

    def set_points_by_ends(self, start, end, buff=0, path_arc=0):
        if path_arc:
            arc = ArcBetweenPoints(self.start, self.end, angle=self.path_arc)
            self.set_points(arc.get_points())
        else:
            self.set_points_as_corners([start, end])
        self.account_for_buff(buff)

    init_points = generate_points

    def set_path_arc(self, new_value):
        self.path_arc = new_value
        self.init_points()

    def account_for_buff(self, buff):
        if buff == 0:
            return
        #
        if self.path_arc == 0:
            length = self.get_length()
        else:
            length = self.get_arc_length()
        #
        if length < 2 * buff:
            return
        buff_proportion = buff / length
        self.pointwise_become_partial(self, buff_proportion, 1 - buff_proportion)
        return self

    def set_start_and_end_attrs(self, start, end):
        # If either start or end are Mobjects, this
        # gives their centers
        rough_start = self.pointify(start)

Review comment (suggestion):
```suggestion

        self.account_for_buff(buff)
```

Code after:
        self.shift(self.arc_center)

    init_points = generate_points


class Line(TipableVMobject):
    def __init__(self, start=LEFT, end=RIGHT, buff=0, path_arc=None, **kwargs):
        self.dim = 3
        self.buff = buff
        self.path_arc = path_arc
        self.set_start_and_end_attrs(start, end)
        super().__init__(**kwargs)

    def generate_points(self):
        self.set_points_by_ends(
            start=self.start, end=self.end, buff=self.buff, path_arc=self.path_arc
        )

    def set_points_by_ends(self, start, end, buff=0, path_arc=0):
        if path_arc:
            arc = ArcBetweenPoints(self.start, self.end, angle=self.path_arc)
            self.set_points(arc.get_points())
        else:
            self.set_points_as_corners([start, end])

        self.account_for_buff(buff)

    init_points = generate_points

    def set_path_arc(self, new_value):
        self.path_arc = new_value
        self.init_points()

    def account_for_buff(self, buff):
        if buff == 0:
            return
        #
        if self.path_arc == 0:
            length = self.get_length()
        else:
            length = self.get_arc_length()
        #
        if length < 2 * buff:
            return
        buff_proportion = buff / length
        self.pointwise_become_partial(self, buff_proportion, 1 - buff_proportion)
        return self

    def set_start_and_end_attrs(self, start, end):
        # If either start or end are Mobjects, this
        # gives their centers