Skip to content

Commit 2b75c9e

Browse files
authored
Merge pull request matplotlib#30321 from nrnavaneet/feature-branch
Fix type annotation for Axes.get_legend() to include None
2 parents b766c96 + 3070ac8 commit 2b75c9e

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
@@ -225,7 +225,7 @@ class _AxesBase(martist.Artist):
225225
ymin: float | None = ...,
226226
ymax: float | None = ...
227227
) -> tuple[float, float, float, float]: ...
228-
def get_legend(self) -> Legend: ...
228+
def get_legend(self) -> Legend | None: ...
229229
def get_images(self) -> list[AxesImage]: ...
230230
def get_lines(self) -> list[Line2D]: ...
231231
def get_xaxis(self) -> XAxis: ...

0 commit comments

Comments
 (0)