diff --git a/djlint/__init__.py b/djlint/__init__.py index 6b103fbe8..9eab980b7 100644 --- a/djlint/__init__.py +++ b/djlint/__init__.py @@ -381,7 +381,7 @@ def main( echo() progress_char = " »" if sys.platform == "win32" else "┈━" - worker_count = min(os.cpu_count() or 1, 4) + worker_count = min(os.cpu_count() or 1, len(file_list), 4) executor_cls = ( ProcessPoolExecutor if worker_count > 1 else ThreadPoolExecutor )