Skip to content

Commit

Permalink
Hide tqdm if DIALS_NOBANNER (cctbx#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme-winter authored Nov 25, 2024
1 parent 8d36ec9 commit c46a758
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions newsfragments/774.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``dials.show``: hide tqdm if DIALS_NOBANNER
4 changes: 2 additions & 2 deletions src/dxtbx/model/experiment_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ def from_filenames(
if format_kwargs is None:
format_kwargs = {}

if os.isatty and len(filenames) > 1:
filename_iter = tqdm(to_process, total=len(filenames), file=sys.stdout)
if os.isatty and len(filenames) > 1 and "DIALS_NOBANNER" not in os.environ:
filename_iter = tqdm(to_process, total=len(filenames))
else:
filename_iter = to_process

Expand Down

0 comments on commit c46a758

Please sign in to comment.