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

Code before:
        *args,
        use_override=True,
        **kwargs,
    ) -> Self:
        if isinstance(mobject, Mobject) and use_override:
            func = mobject.animation_override_for(cls)
            if func is not None:
                anim = func(mobject, *args, **kwargs)
                logger.debug(
                    f"The {cls.__name__} animation has been is overridden for "
                    f"{type(mobject).__name__} mobjects. use_override = False can "
                    f" be used as keyword argument to prevent animation overriding.",
                )
                return anim
        return super().__new__(cls)

    def __init__(
        self,
        mobject: Mobject | None,
        lag_ratio: float = DEFAULT_ANIMATION_LAG_RATIO,
        run_time: float = DEFAULT_ANIMATION_RUN_TIME,
        rate_func: Callable[[float], float] = smooth,
        reverse_rate_function: bool = False,
        name: str = None,
        remover: bool = False,  # remove a mobject from the screen?
        suspend_mobject_updating: bool | None = True,
        introducer: bool = False,
        *,
        _on_finish: Callable[[], None] = lambda _: None,
        **kwargs: Any,
    ) -> None:
        self._typecheck_input(mobject)
        self.run_time: float = run_time
        self.rate_func: Callable[[float], float] = rate_func
        self.reverse_rate_function: bool = reverse_rate_function
        self.name: str | None = name
        self.remover: bool = remover
        self.introducer: bool = introducer
        self.suspend_mobject_updating: bool = suspend_mobject_updating
        self.lag_ratio: float = lag_ratio
        self._on_finish: Callable[[Scene], None] = _on_finish
        if config["renderer"] == RendererType.OPENGL:
            self.starting_mobject: OpenGLMobject = OpenGLMobject()
            self.mobject: OpenGLMobject = (
                mobject if mobject is not None else OpenGLMobject()
            )
        else:
            self.starting_mobject: Mobject = Mobject()
            self.mobject: Mobject = mobject if mobject is not None else Mobject()
        if kwargs:
            logger.debug("Animation received extra kwargs: %s", kwargs)

Review comment (bug):
I looked at the source code and concluded that `suspend_mobject_updating` should always be of type `bool`, because it's only used in `if self.suspend_mobject_updating`-like statements. There is no check for whether `suspend_mobject_updating` is actually `None` to do some kind of third action: they only check whether it's truthy or falsey.

The reason why you got an error is because the animations `MoveAlongPath` and `ChangingDecimal` currently have the `suspend_mobject_updating` parameter typed as `bool | None`, but this is incorrect (and their default values are `False`, anyways). To fix this error, those parameters should instead be typed as simply `bool`.

Code after:
        use_override=True,
        **kwargs,
    ) -> Self:
        if isinstance(mobject, Mobject) and use_override:
            func = mobject.animation_override_for(cls)
            if func is not None:
                anim = func(mobject, *args, **kwargs)
                logger.debug(
                    f"The {cls.__name__} animation has been overridden for "
                    f"{type(mobject).__name__} mobjects. use_override = False can "
                    f" be used as keyword argument to prevent animation overriding.",
                )
                return anim
        return super().__new__(cls)

    def __init__(
        self,
        mobject: Mobject | None,
        lag_ratio: float = DEFAULT_ANIMATION_LAG_RATIO,
        run_time: float = DEFAULT_ANIMATION_RUN_TIME,
        rate_func: Callable[[float], float] = smooth,
        reverse_rate_function: bool = False,
        name: str = None,
        remover: bool = False,  # remove a mobject from the screen?
        suspend_mobject_updating: bool = True,
        introducer: bool = False,
        *,
        _on_finish: Callable[[], None] = lambda _: None,
        use_override: bool = True,  # included here to avoid TypeError if passed from a subclass' constructor
    ) -> None:
        self._typecheck_input(mobject)
        self.run_time: float = run_time
        self.rate_func: Callable[[float], float] = rate_func
        self.reverse_rate_function: bool = reverse_rate_function
        self.name: str | None = name
        self.remover: bool = remover
        self.introducer: bool = introducer
        self.suspend_mobject_updating: bool = suspend_mobject_updating
        self.lag_ratio: float = lag_ratio
        self._on_finish: Callable[[Scene], None] = _on_finish
        if config["renderer"] == RendererType.OPENGL:
            self.starting_mobject: OpenGLMobject = OpenGLMobject()
            self.mobject: OpenGLMobject = (
                mobject if mobject is not None else OpenGLMobject()
            )
        else:
            self.starting_mobject: Mobject = Mobject()
            self.mobject: Mobject = mobject if mobject is not None else Mobject()

        if hasattr(self, "CONFIG"):
            logger.error(