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

Skip to content

Commit a48be9f

Browse files
committed
MNT: defaulting Artist.stale_callback to None
This reverts 53e2db2 to make pickle/unpickle easier to deal with. This could also be dealt with by making sure that `__setstate__` restores the no-op, but that would require touching a lot more code.
1 parent 5bd4711 commit a48be9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/artist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Artist(object):
8383

8484
def __init__(self):
8585
self._stale = True
86-
self.stale_callback = lambda self, value: None
86+
self.stale_callback = None
8787
self._axes = None
8888
self.figure = None
8989

@@ -242,7 +242,7 @@ def stale(self, val):
242242
if self.get_animated():
243243
return
244244

245-
if val:
245+
if val and self.stale_callback is not None:
246246
self.stale_callback(self, val)
247247

248248
def get_window_extent(self, renderer):

0 commit comments

Comments
 (0)