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

Skip to content

Commit 31e32dd

Browse files
fix PEP8 and remove first, pure-text implementation
1 parent eb6a881 commit 31e32dd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,12 +1834,12 @@ def __init__(self, parent, help, title="Help"):
18341834
sizer = wx.BoxSizer(wx.VERTICAL)
18351835
grid_sizer = wx.FlexGridSizer(0, 3, 8, 6)
18361836
# create and add the entries
1837-
widths = [100,140, 300]
1837+
widths = [100, 140, 300]
18381838
bold = self.GetFont().MakeBold()
1839-
for r,row in enumerate(help):
1840-
for (col,width) in zip(row, widths):
1839+
for r, row in enumerate(help):
1840+
for (col, width) in zip(row, widths):
18411841
label = wx.StaticText(self, label=col)
1842-
if r==0:
1842+
if r == 0:
18431843
label.SetFont(bold)
18441844
label.Wrap(width)
18451845
grid_sizer.Add(label, 0, 0, 0)
@@ -1858,10 +1858,6 @@ def OnClose(self, evt):
18581858

18591859

18601860
class HelpWx(backend_tools.ToolHelpBase):
1861-
def trigger(self, *args):
1862-
wx.MessageBox(self._get_help_text().replace("\t", " "),
1863-
"Help", style=wx.OK|wx.CENTRE,
1864-
parent=self.figure.canvas.GetTopLevelParent())
18651861
def trigger(self, *args):
18661862
help = [("Action","Shortcuts", "Description")]
18671863
help += self._get_help_entries()

0 commit comments

Comments
 (0)