Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb50762

Browse files
fix PEP8 warnings
1 parent 856e345 commit fb50762

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,6 +1361,8 @@ def _load_bitmap(filename):
13611361

13621362

13631363
_FRAME_ICON = None
1364+
1365+
13641366
def _set_frame_icon(frame):
13651367
# set frame icon
13661368
global _FRAME_ICON
@@ -1369,9 +1371,11 @@ def _set_frame_icon(frame):
13691371
for image in ('matplotlib.png', 'matplotlib_large.png'):
13701372
image = os.path.join(matplotlib.rcParams['datapath'], 'images',
13711373
image)
1372-
if not os.path.exists(image): continue
1374+
if not os.path.exists(image):
1375+
continue
13731376
icon = wx.Icon(_load_bitmap(image))
1374-
if not icon.IsOk(): return
1377+
if not icon.IsOk():
1378+
return
13751379
bundle.AddIcon(icon)
13761380
frame.SetIcons(_FRAME_ICON)
13771381

@@ -1757,7 +1761,7 @@ def add_toolitem(
17571761
tool = self.InsertTool(idx, -1, name, bmp, wx.NullBitmap, kind,
17581762
description or "")
17591763
else:
1760-
size = (self.GetTextExtent(name)[0]+10,-1)
1764+
size = (self.GetTextExtent(name)[0]+10, -1)
17611765
if toggle:
17621766
control = wx.ToggleButton(self, -1, name, size=size)
17631767
else:
@@ -1796,6 +1800,7 @@ def toggle_toolitem(self, name, toggled):
17961800
else:
17971801
tool.GetControl().SetValue(toggled)
17981802
self.Refresh()
1803+
17991804
def remove_toolitem(self, name):
18001805
for tool, handler in self._toolitems[name]:
18011806
self.DeleteTool(tool.Id)

0 commit comments

Comments
 (0)