8000 use ret == False instead of ret is False · matplotlib/matplotlib@73371b0 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 73371b0

Browse files
committed
use ret == False instead of ret is False
per review
1 parent 2ac78c7 commit 73371b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,14 +1118,14 @@ def _timer_set_single_shot(self):
11181118
def _on_timer(self):
11191119
'''
11201120
Runs all function that have been registered as callbacks. Functions
1121-
can return False if they should not be called any more. If there
1121+
can return False (or 0) if they should not be called any more. If there
11221122
are no callbacks, the timer is automatically stopped.
11231123
'''
11241124
for func, args, kwargs in self.callbacks:
11251125
ret = func(*args, **kwargs)
1126-
# docstring above explains why we use `if ret is False` here,
1126+
# docstring above explains why we use `if ret == False` here,
11271127
# instead of `if not ret`.
1128-
if ret is False:
1128+
if ret == False:
11291129
self.callbacks.remove((func, args, kwargs))
11301130

11311131
if len(self.callbacks) == 0:

0 commit comments

Comments
 (0)
0