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

Code before:
        self.data = {}
        self.depth_test = False
        self.is_fixed_in_frame = False
        self.gloss = 0.0
        self.shadow = 0.0
        self.needs_new_bounding_box = True
        self.parents = []
        self.family = [self]

        self.init_gl_data()
        self.init_gl_points()
        self.init_gl_colors()

        Container.__init__(self, **kwargs)

    @classmethod
    def get_animation_override(cls, animation_class):
        if animation_class in cls.animation_overrides:
            return cls.animation_overrides[animation_class]
        return None

    @classmethod
    def _add_intrinsic_animation_overrides(cls):
        for method_name in dir(cls):
            if method_name.startswith("__"):  # Preventing attribute errors
                continue
            method = getattr(cls, method_name)
            if hasattr(method, "_override_animation"):
                animation_class = method._override_animation
                cls.add_animation_override(animation_class, method)

    @classmethod
    def add_animation_override(cls, animation_class, override_func):
        print(cls.animation_overrides)
        if animation_class not in cls.animation_overrides:
            cls.animation_overrides[animation_class] = override_func
        else:
            raise MultiAnimationOverrideException(
                (
                    f"The animation {animation_class.__name__} for "
                    f"{cls.__name__} is overridden by more than one method: "
                    f"{cls.animation_overrides[animation_class].__qualname__} and "
                    f"{override_func.__qualname__}."
                )
            )

    def init_gl_data(self):
        pass

    def init_gl_points(self):
        pass

Review comment (suggestion):
```suggestion
            # Ignore dunder methods
            if method_name.startswith("__"):
                continue

```

Code after:
        self.init_colors()

        # OpenGL data.
        self.data = {}
        self.depth_test = False
        self.is_fixed_in_frame = False
        self.gloss = 0.0
        self.shadow = 0.0
        self.needs_new_bounding_box = True
        self.parents = []
        self.family = [self]

        self.init_gl_data()
        self.init_gl_points()
        self.init_gl_colors()

        Container.__init__(self, **kwargs)

    @classmethod
    def animation_override_for(
        cls, animation_class: Type["Animation"]
    ) -> "Optional[Callable[[Mobject, ...], Animation]]":
        """Returns the function defining a specific animation override for this class.

        Parameters
        ----------
        animation_class
            The animation class for which the override function should be returned.

        Returns
        -------
        Optional[Callable[[Mobject, ...], Animation]]
            The function returning the override animation or ``None`` if no such animation
            override is defined.
        """
        if animation_class in cls.animation_overrides:
            return cls.animation_overrides[animation_class]

        return None

    @classmethod
    def _add_intrinsic_animation_overrides(cls):
        """Initializes animation overrides marked with the :func:`~.override_animation`
        decorator.
        """
        for method_name in dir(cls):
            # Ignore dunder methods
            if method_name.startswith("__"):
                continue

            method = getattr(cls, method_name)