Skip to content

Commit b5b0003

Browse files
authored
Merge pull request #10689 from cclauss/declare-globals
Declare global variables that are created elsewhere
2 parents 7b5deb3 + c5d2c7f commit b5b0003

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/matplotlib/backends/backend_webagg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ class ServerThread(threading.Thread):
4343
def run(self):
4444
tornado.ioloop.IOLoop.instance().start()
4545

46+
4647
webagg_server_thread = ServerThread()
4748

4849

4950
class FigureCanvasWebAgg(core.FigureCanvasWebAggCore):
5051
def show(self):
5152
# show the figure window
53+
global show # placates pyflakes: created by @_Backend.export below
5254
show()
5355

5456
def new_timer(self, *args, **kwargs):

lib/matplotlib/backends/backend_wx.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,7 @@ def updateButtonText(self, lst):
14541454
@cbook.deprecated("2.2")
14551455
class SubplotToolWX(wx.Frame):
14561456
def __init__(self, targetfig):
1457+
global FigureManager # placates pyflakes: created by @_Backend.export
14571458
wx.Frame.__init__(self, None, -1, "Configure subplots")
14581459

14591460
toolfig = Figure((6, 3))
@@ -1521,6 +1522,7 @@ def pan(self, *args):
15211522
NavigationToolbar2.pan(self, *args)
15221523

15231524
def configure_subplots(self, evt):
1525+
global FigureManager # placates pyflakes: created by @_Backend.export
15241526
frame = wx.Frame(None, -1, "Configure subplots")
15251527

15261528
toolfig = Figure((6, 3))

0 commit comments

Comments
 (0)