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

Code before:
        self.gradient = gradient
        self.tab_width = tab_width
        if t2c is None:
            t2c = {}
        if t2f is None:
            t2f = {}
        if t2g is None:
            t2g = {}
        if t2s is None:
            t2s = {}
        if t2w is None:
            t2w = {}
        # If long form arguments are present, they take precedence
        t2c = kwargs.pop("text2color", t2c)
        t2f = kwargs.pop("text2font", t2f)
        t2g = kwargs.pop("text2gradient", t2g)
        t2s = kwargs.pop("text2slant", t2s)
        t2w = kwargs.pop("text2weight", t2w)
        assert t2c is not None
        assert t2f is not None
        assert t2g is not None
        assert t2s is not None
        assert t2w is not None
        self.t2c: dict[str, str] = {k: ManimColor(v).to_hex() for k, v in t2c.items()}
        self.t2f: dict[str, str] = t2f
        self.t2g: dict[str, tuple] = t2g
        self.t2s: dict[str, str] = t2s
        self.t2w: dict[str, str] = t2w

        self.original_text = text
        self.disable_ligatures = disable_ligatures
        text_without_tabs = text
        if text.find("\t") != -1:
            text_without_tabs = text.replace("\t", " " * self.tab_width)
        self.text = text_without_tabs
        if self.line_spacing == -1:
            self.line_spacing = (
                self._font_size + self._font_size * DEFAULT_LINE_SPACING_SCALE
            )
        else:
            self.line_spacing = self._font_size + self._font_size * self.line_spacing

        parsed_color: ManimColor = ManimColor(color) if color else VMobject().color
        file_name = self._text2svg(parsed_color.to_hex())
        PangoUtils.remove_last_M(file_name)
        super().__init__(
            file_name,
            fill_opacity=fill_opacity,
            stroke_width=stroke_width,
            height=height,
            width=width,

Review comment (suggestion):
```suggestion
        self.t2g: dict[str, Iterable[ParsableManimColor]] = t2g
```

Code after:
        if t2c is None:
            t2c = {}
        if t2f is None:
            t2f = {}
        if t2g is None:
            t2g = {}
        if t2s is None:
            t2s = {}
        if t2w is None:
            t2w = {}
        # If long form arguments are present, they take precedence
        t2c = kwargs.pop("text2color", t2c)
        t2f = kwargs.pop("text2font", t2f)
        t2g = kwargs.pop("text2gradient", t2g)
        t2s = kwargs.pop("text2slant", t2s)
        t2w = kwargs.pop("text2weight", t2w)
        assert t2c is not None
        assert t2f is not None
        assert t2g is not None
        assert t2s is not None
        assert t2w is not None
        self.t2c: dict[str, str] = {k: ManimColor(v).to_hex() for k, v in t2c.items()}
        self.t2f: dict[str, str] = t2f
        self.t2g: dict[str, Iterable[ParsableManimColor]] = t2g
        self.t2s: dict[str, str] = t2s
        self.t2w: dict[str, str] = t2w

        self.original_text = text
        self.disable_ligatures = disable_ligatures
        text_without_tabs = text
        if text.find("\t") != -1:
            text_without_tabs = text.replace("\t", " " * self.tab_width)
        self.text = text_without_tabs
        if self.line_spacing == -1:
            self.line_spacing = (
                self._font_size + self._font_size * DEFAULT_LINE_SPACING_SCALE
            )
        else:
            self.line_spacing = self._font_size + self._font_size * self.line_spacing

        parsed_color: ManimColor = ManimColor(color) if color else VMobject().color
        file_name = self._text2svg(parsed_color.to_hex())
        PangoUtils.remove_last_M(file_name)
        super().__init__(
            file_name,
            fill_opacity=fill_opacity,
            stroke_width=stroke_width,
            height=height,
            width=width,
            should_center=should_center,
            use_svg_cache=use_svg_cache,