mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-16 21:40:24 +00:00
feat(windows): added a better progress bar char for windows
closes #286
This commit is contained in:
parent
83297bd15b
commit
3cdb7a7b97
1 changed files with 5 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue