Allow specifying --workers
via environment variable
#3742
Labels
T: enhancement
New feature or request
--workers
via environment variable
#3742
Is your feature request related to a problem? Please describe.
I ran into #2513 in my CI system
While I can hardcode
--workers
into my invocations of black (in this case, via pre-commit), it's a little unnatural, since the number of cores differs between CI workers and say locally. E.g., I can hardcode the minimum of them, but then we leave some perf on the table.Describe the solution you'd like
I'd like to specify it by environment variable, say
BLACK_NUM_WORKERS
. This isn't unprecedented, e.g.BLACK_CACHE_DIR
exists. This does increase configuration complexity a little.Describe alternatives you've considered
Just hardcoding
--workers
. It's not the biggest deal.The text was updated successfully, but these errors were encountered: