diff --git a/lib/matplotlib/axes/_base.pyi b/lib/matplotlib/axes/_base.pyi index 4933d0d1e236..cb538a49172a 100644 --- a/lib/matplotlib/axes/_base.pyi +++ b/lib/matplotlib/axes/_base.pyi @@ -225,7 +225,7 @@ class _AxesBase(martist.Artist): ymin: float | None = ..., ymax: float | None = ... ) -> tuple[float, float, float, float]: ... - def get_legend(self) -> Legend: ... + def get_legend(self) -> Legend | None: ... def get_images(self) -> list[AxesImage]: ... def get_lines(self) -> list[Line2D]: ... def get_xaxis(self) -> XAxis: ...