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

Code before:
            return

        if val and self.stale_callback is not None:
            self.stale_callback(self, val)

    def get_window_extent(self, renderer=None):
        """
        Get the artist's bounding box in display space.

        The bounding box's width and height are non-negative.

        Subclasses should override for inclusion in the bounding box
        "tight" calculation. Default is to return an empty bounding
        box at 0, 0.

        .. warning ::

          Be careful when using this function, the results will not update if
          the artist window extent of the artist changes.

          The extent can change due to any changes in the transform stack, such
          as changing the Axes limits, the figure size, the canvas used (as is
          done when saving a figure), or the DPI.

          This can lead to unexpected behavior where interactive figures will
          look fine on the screen, but will save incorrectly.

          To get accurate results you may need to manually call
          `matplotlib.figure.Figure.savefig` or
          `matplotlib.figure.Figure.draw_without_rendering` to have Matplotlib
          compute the rendered size.

        """
        return Bbox([[0, 0], [0, 0]])

    def get_tightbbox(self, renderer=None):
        """
        Like `.Artist.get_window_extent`, but includes any clipping.

        Parameters
        ----------
        renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional
            renderer that will be used to draw the figures (i.e.
            ``fig.canvas.get_renderer()``)

        Returns
        -------
        `.Bbox` or None
            The enclosing bounding box (in figure pixel coordinates).
            Returns None if clipping results in no intersection.
        """

Review comment (bug):
This reads a bit awkward: Of course numeric results are not auto-updated. I believe nobody would expect this. We can therefore leave out the first paragraph (we also don't need "be careful" as that's raising of awareness is now done through the warning format.

I've also slightly reworded the second paragraph to not only include the screen -> file change.

```suggestion
          The extent can change due to any changes in the transform stack, such
          as changing the Axes limits, the figure size, the canvas used (as is
          done when saving a figure), or the DPI.

          Relying on a once-retrieved window extent can lead to unexpected
          behavior in various cases such as interactive figures being resized or
          moved to a screen with different dpi, or figures that look fine on
          screen render incorrectly when saved to file.
```

Code after:
            return

        if val and self.stale_callback is not None:
            self.stale_callback(self, val)

    def get_window_extent(self, renderer=None):
        """
        Get the artist's bounding box in display space.

        The bounding box's width and height are non-negative.

        Subclasses should override for inclusion in the bounding box
        "tight" calculation. Default is to return an empty bounding
        box at 0, 0.

        .. warning::

          The extent can change due to any changes in the transform stack, such
          as changing the Axes limits, the figure size, the canvas used (as is
          done when saving a figure), or the DPI.

          Relying on a once-retrieved window extent can lead to unexpected
          behavior in various cases such as interactive figures being resized or
          moved to a screen with different dpi, or figures that look fine on
          screen render incorrectly when saved to file.

          To get accurate results you may need to manually call
          `matplotlib.figure.Figure.savefig` or
          `matplotlib.figure.Figure.draw_without_rendering` to have Matplotlib
          compute the rendered size.

        """
        return Bbox([[0, 0], [0, 0]])

    def get_tightbbox(self, renderer=None):
        """
        Like `.Artist.get_window_extent`, but includes any clipping.

        Parameters
        ----------
        renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional
            renderer that will be used to draw the figures (i.e.
            ``fig.canvas.get_renderer()``)

        Returns
        -------
        `.Bbox` or None
            The enclosing bounding box (in figure pixel coordinates).
            Returns None if clipping results in no intersection.
        """
        bbox = self.get_window_extent(renderer)