Skip to content

Commit 0139aca

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #30321: Fix type annotation for Axes.get_legend() to include None
1 parent 98594a2 commit 0139aca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class _AxesBase(martist.Artist):
224224
ymin: float | None = ...,
225225
ymax: float | None = ...
226226
) -> tuple[float, float, float, float]: ...
227-
def get_legend(self) -> Legend: ...
227+
def get_legend(self) -> Legend | None: ...
228228
def get_images(self) -> list[AxesImage]: ...
229229
def get_lines(self) -> list[Line2D]: ...
230230
def get_xaxis(self) -> XAxis: ...

0 commit comments

Comments
 (0)