Repository: ManimCommunity/manim
File: manim/renderer/shader.py (Python)

Code before:

    def get_updaters(self) -> list[Callable]:
        return self.time_based_updaters + self.non_time_updaters

    def add_updater(
        self,
        update_function: Callable,
        index: int | None = None,
        call_updater: bool = True,
    ) -> Self:
        if "dt" in inspect.signature(update_function).parameters:
            updater_list = self.time_based_updaters
        else:
            updater_list = self.non_time_updaters

        if index is None:
            updater_list.append(update_function)
        else:
            updater_list.insert(index, update_function)

        self.refresh_has_updater_status()
        if call_updater:
            self.update()
        return self

    def remove_updater(self, update_function: Callable) -> Self:
        for updater_list in [self.time_based_updaters, self.non_time_updaters]:
            while update_function in updater_list:
                updater_list.remove(update_function)
        self.refresh_has_updater_status()
        return self

    def clear_updaters(self) -> Self:
        self.time_based_updaters = []
        self.non_time_updaters = []
        self.refresh_has_updater_status()
        return self

    def match_updaters(self, mobject: Mobject) -> Self:
        self.clear_updaters()
        for updater in mobject.get_updaters():
            self.add_updater(updater)
        return self

    def suspend_updating(self) -> Self:
        self.updating_suspended = True
        return self

    def resume_updating(self, call_updater: bool = True) -> Self:
        self.updating_suspended = False
        if call_updater:

Review comment (suggestion):
```suggestion
    def remove_updater(self, update_function: MeshUpdater) -> Self:
```

Code after:
        return len(self.time_based_updaters) > 0

    def get_updaters(self) -> list[MeshUpdater]:
        return self.time_based_updaters + self.non_time_updaters

    def add_updater(
        self,
        update_function: MeshUpdater,
        index: int | None = None,
        call_updater: bool = True,
    ) -> Self:
        if "dt" in inspect.signature(update_function).parameters:
            self._add_time_based_updater(update_function, index)  # type: ignore[arg-type]
        else:
            self._add_non_time_updater(update_function, index)  # type: ignore[arg-type]

        self.refresh_has_updater_status()
        if call_updater:
            self.update()
        return self

    def _add_time_based_updater(
        self, update_function: MeshTimeBasedUpdater, index: int | None = None
    ) -> None:
        if index is None:
            self.time_based_updaters.append(update_function)
        else:
            self.time_based_updaters.insert(index, update_function)

    def _add_non_time_updater(
        self, update_function: MeshNonTimeBasedUpdater, index: int | None = None
    ) -> None:
        if index is None:
            self.non_time_updaters.append(update_function)
        else:
            self.non_time_updaters.insert(index, update_function)

    def remove_updater(self, update_function: MeshUpdater) -> Self:
        while update_function in self.time_based_updaters:
            self.time_based_updaters.remove(update_function)  # type: ignore[arg-type]
        while update_function in self.non_time_updaters:
            self.non_time_updaters.remove(update_function)  # type: ignore[arg-type]
        self.refresh_has_updater_status()
        return self

    def clear_updaters(self) -> Self:
        self.time_based_updaters = []
        self.non_time_updaters = []
        self.refresh_has_updater_status()
        return self