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

Code before:
    text
        The label text.
    brace_direction
        The direction of the brace. By default ``DOWN``.
    label_constructor
        A class or function used to construct a mobject representing
        the label. By default :class:`~.MathTex`.
    font_size
        The font size of the label, passed to the ``label_constructor``.
    buff
        The buffer between the mobject and the brace.
    brace_config
        Arguments to be passed to :class:`.Brace`.
    kwargs
        Additional arguments to be passed to :class:`~.VMobject`.
    """

    def __init__(
        self,
        obj: Mobject,
        text: str,
        brace_direction: np.ndarray = DOWN,
        label_constructor: type = MathTex,
        font_size: float = DEFAULT_FONT_SIZE,
        buff: float = 0.2,
        brace_config: dict | None = None,
        **kwargs: Any,
    ):
        self.label_constructor = label_constructor
        super().__init__(**kwargs)

        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:

Review comment (suggestion):
```suggestion
        brace_config: dict[str, Any] | None = None,
```

Code after:
    brace_direction
        The direction of the brace. By default ``DOWN``.
    label_constructor
        A class or function used to construct a mobject representing
        the label. By default :class:`~.MathTex`.
    font_size
        The font size of the label, passed to the ``label_constructor``.
    buff
        The buffer between the mobject and the brace.
    brace_config
        Arguments to be passed to :class:`.Brace`.
    kwargs
        Additional arguments to be passed to :class:`~.VMobject`.
    """

    def __init__(
        self,
        obj: Mobject,
        text: str,
        brace_direction: Point3DLike = DOWN,
        label_constructor: type[SingleStringMathTex | Text] = MathTex,
        font_size: float = DEFAULT_FONT_SIZE,
        buff: float = 0.2,
        brace_config: dict[str, Any] | None = None,
        **kwargs: Any,
    ):
        self.label_constructor = label_constructor
        super().__init__(**kwargs)

        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))