list()-ify filter()
return, otherwise boolean checks against it are wrong
This commit is contained in:
parent
c3454f2bfe
commit
5077bad522
1 changed files with 2 additions and 1 deletions
|
@ -83,7 +83,8 @@ class Timers(object):
|
|||
self.timers.append(timer)
|
||||
|
||||
def next(self) -> typing.Optional[float]:
|
||||
times = filter(None, [timer.time_left() for timer in self.get_timers()])
|
||||
times = list(filter(None,
|
||||
[timer.time_left() for timer in self.get_timers()]))
|
||||
if not times:
|
||||
return None
|
||||
return max(min(times), 0)
|
||||
|
|
Loading…
Reference in a new issue