Skip to content

Commit

Permalink
Small improvement in progress bar to clean up dirty contents from oth…
Browse files Browse the repository at this point in the history
…er processes
  • Loading branch information
anibalinn committed Aug 12, 2024
1 parent 7f42b8b commit 46a3f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion behavex/progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _print_progress_bar(self, new_line=False):
bar = '█' * filled_length + '-' * (self.bar_length - filled_length)
elapsed_time = time.time() - self.start_time
elapsed_formatted = time.strftime("%M:%S", time.gmtime(elapsed_time))
progress_bar_content = f"\r{prefix}{percent:.0f}%|{bar}| {self.current_iteration}/{self.total} [{elapsed_formatted}]"
progress_bar_content = f"\r{prefix}{percent:.0f}%|{bar}| {self.current_iteration}/{self.total} [{elapsed_formatted}]\r"
if self.print_in_new_lines or new_line:
print(progress_bar_content)
else:
Expand Down

0 comments on commit 46a3f7c

Please sign in to comment.