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

Skip to content

Commit 2f87853

Browse files
committed
wording fix
1 parent 3159fa4 commit 2f87853

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3016,7 +3016,8 @@ def mouse_move(self, event):
30163016
self.set_message(self._mouse_event_to_message(event))
30173017

30183018
if callable(getattr(self, 'set_hover_message', None)):
3019-
nonrect = lambda x: not isinstance(x, Rectangle)
3019+
def nonrect(x):
3020+
return not isinstance(x, Rectangle)
30203021
for a in self.canvas.figure.findobj(match=nonrect, include_self=False):
30213022
inside, prop = a.contains(event)
30223023
if inside:

lib/matplotlib/tests/test_artist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def test_set_hover():
331331
art.set_hover(True)
332332

333333
fig, ax = plt.subplots()
334-
im = ax.imshow(np.arange(36).reshape(6, 6)) # non-blank canvasses
334+
im = ax.imshow(np.arange(36).reshape(6, 6)) # non-blank canvas
335335

336336
im.set_hover(True) # set hover variable to possible values given a figure exists
337337
assert im.get_hover()
@@ -342,6 +342,7 @@ def test_set_hover():
342342

343343
im.remove()
344344

345+
345346
def test_callbacks():
346347
def func(artist):
347348
func.counter += 1

0 commit comments

Comments
 (0)