From 3cdb7a7b9750e93cda5a5d356089173fcbb5aee1 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Wed, 7 Sep 2022 13:25:00 -0500 Subject: [PATCH] feat(windows): added a better progress bar char for windows closes #286 --- src/djlint/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/djlint/__init__.py b/src/djlint/__init__.py index 994c113..bc90645 100644 --- a/src/djlint/__init__.py +++ b/src/djlint/__init__.py @@ -215,9 +215,12 @@ def main( worker_count = os.cpu_count() or 1 + progress_char ="┈━" + if sys.platform == "win32": # Work around https://bugs.python.org/issue26903 worker_count = min(worker_count, 60) + progress_char =" »" with ProcessPoolExecutor(max_workers=worker_count) as exe: file_errors = [] @@ -231,7 +234,7 @@ def main( total=len(file_list), bar_format=bar_message, colour="BLUE", - ascii="┈━", + ascii=progress_char, leave=False, ) as pbar: @@ -259,7 +262,7 @@ def main( initial=len(file_list), bar_format=finished_bar_message, colour="GREEN", - ascii="┈━", + ascii=progress_char, leave=True, ) finished_bar.close()