X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c732a1f13a4b75d84dfd74eda0a57a55936d2e22..7be273531852a16a407fcb66d5efeede0f7ca474:/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)