X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/b60b85b234d6a575f636d0a125478115f993c90c..f01aaa63a0ff792b932205cbb539f70aca769d7d:/src/black/concurrency.py 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)