X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/b60b85b234d6a575f636d0a125478115f993c90c..839ef35dc1d72bb6eceac9fa809f095e2edcd12b:/src/black/concurrency.py?ds=inline diff --git a/src/black/concurrency.py b/src/black/concurrency.py index 1598f51..893eba6 100644 --- a/src/black/concurrency.py +++ b/src/black/concurrency.py @@ -80,7 +80,8 @@ def reformat_many( executor: Executor if workers is None: - workers = os.cpu_count() or 1 + workers = int(os.environ.get("BLACK_NUM_WORKERS", 0)) + workers = workers or os.cpu_count() or 1 if sys.platform == "win32": # Work around https://bugs.python.org/issue26903 workers = min(workers, 60)