need bracket for correct evaluation

This commit is contained in:
Martin Diehl 2022-02-10 21:28:48 +01:00
parent 97d17ea50c
commit 57e8fe2b8a
1 changed files with 1 additions and 1 deletions

View File

@ -763,7 +763,7 @@ class ProgressBar:
fraction = (iteration+1) / self.total
if filled_length := int(self.bar_length * fraction) > int(self.bar_length * self.fraction_last) or \
if (filled_length := int(self.bar_length * fraction)) > int(self.bar_length * self.fraction_last) or \
datetime.datetime.now() - self.time_last_update > datetime.timedelta(seconds=10):
self.time_last_update = datetime.datetime.now()
bar = '' * filled_length + '' * (self.bar_length - filled_length)