Skip to content

Commit

Permalink
Progress bar in notebooks: fit screen and use stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
vladsavelyev committed Apr 16, 2024
1 parent 0d3c189 commit fd1b8fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion multiqc/utils/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import mimetypes
import os
import re
import sys
import tempfile
import time
from collections import defaultdict
Expand Down Expand Up @@ -314,8 +315,9 @@ def add_file(fn, root):
total=len(searchfiles),
desc="Searching",
unit="file",
file=sys.stdout,
disable=config.no_ansi or config.quiet,
bar_format=f"{BLUE}| {'searching':>17} {RESET}| " + "{bar} {percentage:3.0f}% {n_fmt}/{total_fmt} {desc}",
bar_format=f"{BLUE}| {'searching':>17} {RESET}| " + "{bar:50} {percentage:3.0f}% {n_fmt}/{total_fmt} {desc}",
) as pbar:
for i, sf in enumerate(searchfiles):
# Update the progress bar description with the file being searched
Expand Down

0 comments on commit fd1b8fc

Please sign in to comment.