Skip to content

Commit 702dc0e

Browse files
committed
Remove extraneous returns
1 parent 5d0d141 commit 702dc0e

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

examples/event_handling/pick_event_demo2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
def onpick(event):
3535

3636
if event.artist != line:
37-
return True
37+
return
3838

3939
N = len(event.ind)
4040
if not N:
41-
return True
41+
return
4242

4343
figi, axs = plt.subplots(N, squeeze=False)
4444
for ax, dataind in zip(axs.flat, event.ind):
@@ -47,7 +47,7 @@ def onpick(event):
4747
transform=ax.transAxes, va='top')
4848
ax.set_ylim(-0.5, 1.5)
4949
figi.show()
50-
return True
50+
5151

5252
fig.canvas.mpl_connect('pick_event', onpick)
5353

examples/event_handling/pong_sgskip.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def draw(self, event):
231231

232232
self.background = None
233233
self.ax.figure.canvas.draw_idle()
234-
return True
234+
return
235235
puck.disp.set_offsets([[puck.x, puck.y]])
236236
self.ax.draw_artist(puck.disp)
237237

@@ -244,7 +244,6 @@ def draw(self, event):
244244
plt.close()
245245

246246
self.cnt += 1
247-
return True
248247

249248
def on_key_press(self, event):
250249
if event.key == '3':

lib/matplotlib/tests/test_figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_iterability_axes_argument():
315315

316316
class MyAxes(Axes):
317317
def __init__(self, *args, myclass=None, **kwargs):
318-
return Axes.__init__(self, *args, **kwargs)
318+
Axes.__init__(self, *args, **kwargs)
319319

320320
class MyClass:
321321

lib/matplotlib/widgets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ def update(self):
19361936
"""Draw using blit() or draw_idle(), depending on ``self.useblit``."""
19371937
if (not self.ax.get_visible() or
19381938
self.ax.figure._get_renderer() is None):
1939-
return False
1939+
return
19401940
if self.useblit:
19411941
if self.background is not None:
19421942
self.canvas.restore_region(self.background)
@@ -1952,7 +1952,6 @@ def update(self):
19521952
self.canvas.blit(self.ax.bbox)
19531953
else:
19541954
self.canvas.draw_idle()
1955-
return False
19561955

19571956
def _get_data(self, event):
19581957
"""Get the xdata and ydata for event, with limits."""

0 commit comments

Comments
 (0)