Closed ezio-melotti closed 9 months ago
I'm a little confused—wasn't the purpose of including this in the pre-commit-hooks config in sphinx-contrib/sphinx-lint#95 , released in Sphinx-Lint 0.8.1 which we adopted in #351 , such that each individual project wouldn't need to add this?
Testing locally with time pre-commit run --all sphinx-lint
on an old, slow single-threaded by decent multi-threaded with pre-commit 2.20.0 on both master
and this branch that are identical except for this setting, I get essentially identical times for running this check, well within the margin of error (3.75 s +/- 0.3 s vs 3.87 s, +/- 0.4 s across 5 trials each), which suggests it has no measurable effect.
Is there something I'm missing here? Thanks!
Is there something I'm missing here?
Actually I was the one who got confused.
To summarize:
pre-commit
and sphinx-lint
use multiple processessphinx-lint
, this can be achieved by specifying --jobs=1
, for pre-commit
there is require_serial
require_serial
in .pre-commit-hooks.yaml
in the sphinx-lint
repo, we are already telling pre-commit
not to use multiple processes, and in doing so, we prevent conflicts with projects that explicitly sets a specific number of jobs for sphinx-lint
IOW, this PR is not necessary, and can be closed. Sorry for the noise!
Thanks Ezio!
Pull Request
Pull Request Checklist
Description of Changes
sphinx-lint
already uses multiprocessing internally, and this might interfere withprecommit
, since it will try to use multiple processes too. By settingrequire_serial
we preventprecommit
from doing that.See: