8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e148def commit 9b37674Copy full SHA for 9b37674
lib/matplotlib/backend_bases.py
@@ -1370,9 +1370,12 @@ def _on_timer(self):
1370
'''
1371
for func, args, kwargs in self.callbacks:
1372
ret = func(*args, **kwargs)
1373
- # docstring above explains why we use `if ret == False` here,
+ # docstring above explains why we use `if ret == 0` here,
1374
# instead of `if not ret`.
1375
- if ret == False:
+ # This will also catch `ret == False` as `False == 0`
1376
+ # but does not annoy the linters
1377
+ # https://docs.python.org/3/library/stdtypes.html#boolean-values
1378
+ if ret == 0:
1379
self.callbacks.remove((func, args, kwargs))
1380
1381
if len(self.callbacks) == 0:
0 commit comments