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

Code before:

        self.brace_direction = brace_direction
        if brace_config is None:
            brace_config = {}
        self.brace = Brace(obj, brace_direction, buff, **brace_config)

        if isinstance(text, (tuple, list)):
            self.label: VMobject = self.label_constructor(
                *text, font_size=font_size, **kwargs
            )
        else:
            self.label = self.label_constructor(str(text), font_size=font_size)

        self.brace.put_at_tip(self.label)
        self.add(self.brace, self.label)

    def creation_anim(
        self,
        label_anim: type[Animation] = FadeIn,
        brace_anim: type[Animation] = GrowFromCenter,
    ) -> AnimationGroup:
        return AnimationGroup(brace_anim(self.brace), label_anim(self.label))

    # TODO: This method is only called from the method change_brace_label, which is
    # not called from any location in the current codebase.
    # TODO: The Mobject could be more specific.
    def shift_brace(self, obj: Mobject, **kwargs: Any) -> Self:
        if isinstance(obj, list):
            obj = self.get_group_class()(*obj)
        self.brace = Brace(obj, self.brace_direction, **kwargs)
        self.brace.put_at_tip(self.label)
        return self

    # TODO: This method is only called from the method change_brace_label, which is
    # not called from any location in the current codebase.
    def change_label(self, *text: str, **kwargs: Any) -> Self:
        self.label = self.label_constructor(*text, **kwargs)

        self.brace.put_at_tip(self.label)
        return self

    # TODO: This method is not called from anywhere in the codebase.
    def change_brace_label(self, obj: Mobject, *text: str, **kwargs: Any) -> Self:
        self.shift_brace(obj)
        self.change_label(*text, **kwargs)
        return self


class BraceText(BraceLabel):
    def __init__(
        self, obj: Mobject, text: str, label_constructor: type[Tex] = Tex, **kwargs: Any

Review comment (suggestion):
Same here. Btw, the suggestion is also removing the second TODO, but we can keep it if necessary. What do you exactly mean by that second TODO? 
```suggestion
```

Code after:
        if brace_config is None:
            brace_config = {}
        self.brace = Brace(obj, brace_direction, buff, **brace_config)

        if isinstance(text, (tuple, list)):
            self.label: VMobject = self.label_constructor(
                *text, font_size=font_size, **kwargs
            )
        else:
            self.label = self.label_constructor(str(text), font_size=font_size)

        self.brace.put_at_tip(self.label)
        self.add(self.brace, self.label)

    def creation_anim(
        self,
        label_anim: type[Animation] = FadeIn,
        brace_anim: type[Animation] = GrowFromCenter,
    ) -> AnimationGroup:
        return AnimationGroup(brace_anim(self.brace), label_anim(self.label))

    def shift_brace(self, obj: Mobject, **kwargs: Any) -> Self:
        if isinstance(obj, list):
            obj = self.get_group_class()(*obj)
        self.brace = Brace(obj, self.brace_direction, **kwargs)
        self.brace.put_at_tip(self.label)
        return self

    def change_label(self, *text: str, **kwargs: Any) -> Self:
        self.label = self.label_constructor(*text, **kwargs)  # type: ignore[arg-type]
        self.brace.put_at_tip(self.label)
        return self

    def change_brace_label(self, obj: Mobject, *text: str, **kwargs: Any) -> Self:
        self.shift_brace(obj)
        self.change_label(*text, **kwargs)
        return self


class BraceText(BraceLabel):
    def __init__(
        self,
        obj: Mobject,
        text: str,
        label_constructor: type[SingleStringMathTex | Text] = Text,
        **kwargs: Any,
    ):
        super().__init__(obj, text, label_constructor=label_constructor, **kwargs)


class BraceBetweenPoints(Brace):