Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0139aca

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR matplotlib#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)

AltStyle によって変換されたページ (->オリジナル) /