Repository: matplotlib/matplotlib
File: lib/matplotlib/animation.py (Python)

Code before:
        self._init_draw()
        # Actually start the event_source.
        self.event_source.start()

    def _stop(self, *args):
        # On stop we disconnect all of our events.
        if self._blit:
            self._fig.canvas.mpl_disconnect(self._resize_id)
        self._fig.canvas.mpl_disconnect(self._close_id)
        self.event_source.remove_callback(self._step)
        self.event_source = None

    def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
             bitrate=None, extra_args=None, metadata=None, extra_anim=None,
             savefig_kwargs=None, *, progress_callback=None):
        """
        Save the animation as a movie file by drawing every frame.

        Parameters
        ----------
        filename : str
            The output filename, e.g., :file:`mymovie.mp4`.

        writer : `AbstractMovieWriter` subclass or str, default: :rc:`animation.writer`
            The writer to use. This can be an instance of an `AbstractMovieWriter`
            subclass or a string. The builtin writers are

            ==================  ==============================
            str                 class
            ==================  ==============================
            'ffmpeg'            `.FFMpegWriter`
            'ffmpeg_file'       `.FFMpegFileWriter`
            'imagemagick'       `.ImageMagickWriter`
            'imagemagick_file'  `.ImageMagickFileWriter`
            'pillow'            `.PillowWriter`
            'html'              `.HTMLWriter`
            ==================  ==============================

        fps : int, optional
            Movie frame rate (per second).  If not set, the frame rate from the
            animation's frame interval.

        dpi : float, default: :rc:`savefig.dpi`
            Controls the dots per inch for the movie frames.  Together with
            the figure's size in inches, this controls the size of the movie.

        codec : str, default: :rc:`animation.codec`.
            The video codec to use.  Not all codecs are supported by a given
            `MovieWriter`.

        bitrate : int, default: :rc:`animation.bitrate`

Review comment (refactor):
```suggestion
An instance of an `AbstractMovieWriter` subclass or an identifying string. The builtin writers are
````

I don't think `writer to use` is adding anything here. 

Code after:
        self._init_draw()
        # Actually start the event_source.
        self.event_source.start()

    def _stop(self, *args):
        # On stop we disconnect all of our events.
        if self._blit:
            self._fig.canvas.mpl_disconnect(self._resize_id)
        self._fig.canvas.mpl_disconnect(self._close_id)
        self.event_source.remove_callback(self._step)
        self.event_source = None

    def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
             bitrate=None, extra_args=None, metadata=None, extra_anim=None,
             savefig_kwargs=None, *, progress_callback=None):
        """
        Save the animation as a movie file by drawing every frame.

        Parameters
        ----------
        filename : str
            The output filename, e.g., :file:`mymovie.mp4`.

        writer : `AbstractMovieWriter` subclass or str, default: :rc:`animation.writer`
            The writer used to grab the frames and create the movie file.
            This can be an instance of an `AbstractMovieWriter` subclass or a
            string. The builtin writers are

            ==================  ==============================
            str                 class
            ==================  ==============================
            'ffmpeg'            `.FFMpegWriter`
            'ffmpeg_file'       `.FFMpegFileWriter`
            'imagemagick'       `.ImageMagickWriter`
            'imagemagick_file'  `.ImageMagickFileWriter`
            'pillow'            `.PillowWriter`
            'html'              `.HTMLWriter`
            ==================  ==============================

        fps : int, optional
            Movie frame rate (per second).  If not set, the frame rate from the
            animation's frame interval.

        dpi : float, default: :rc:`savefig.dpi`
            Controls the dots per inch for the movie frames.  Together with
            the figure's size in inches, this controls the size of the movie.

        codec : str, default: :rc:`animation.codec`.
            The video codec to use.  Not all codecs are supported by a given
            `MovieWriter`.