Skip to content

Commit e922f7d

Browse files
committed
MNT: add FigureManagerBase.raise_window to stubs
1 parent 591de9e commit e922f7d

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2884,6 +2884,7 @@ def full_screen_toggle(self):
28842884

28852885
def raise_window(self):
28862886
"""For GUI backends, raise the figure window to the top."""
2887+
pass
28872888

28882889
def resize(self, w, h):
28892890
"""For GUI backends, resize the window (in physical pixels)."""

lib/matplotlib/backend_bases.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ class FigureManagerBase:
437437
def show(self) -> None: ...
438438
def destroy(self) -> None: ...
439439
def full_screen_toggle(self) -> None: ...
440+
def raise_window(self) -> None: ...
440441
def resize(self, w: int, h: int) -> None: ...
441442
def get_window_title(self) -> str: ...
442443
def set_window_title(self, title: str) -> None: ...

lib/matplotlib/tests/test_backend_bases.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from matplotlib import path, transforms
44
from matplotlib.backend_bases import (
5-
FigureCanvasBase, KeyEvent, LocationEvent, MouseButton, MouseEvent,
6-
NavigationToolbar2, RendererBase)
5+
FigureCanvasBase, FigureManagerBase, KeyEvent, LocationEvent, MouseButton,
6+
MouseEvent, NavigationToolbar2, RendererBase)
77
from matplotlib.backend_tools import RubberbandBase
88
from matplotlib.figure import Figure
99
from matplotlib.testing._markers import needs_pgf_xelatex
@@ -63,6 +63,12 @@ def test_canvas_ctor():
6363
assert isinstance(FigureCanvasBase().figure, Figure)
6464

6565

66+
def test_figure_manager_base_raise_window_noop():
67+
canvas = FigureCanvasBase(Figure())
68+
manager = FigureManagerBase(canvas, 1)
69+
assert manager.raise_window() is None
70+
71+
6672
def test_get_default_filename():
6773
fig = plt.figure()
6874
assert fig.canvas.get_default_filename() == "Figure_1.png"

0 commit comments

Comments
 (0)