File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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+
345346def test_callbacks ():
346347 def func (artist ):
347348 func .counter += 1
You can’t perform that action at this time.
0 commit comments