mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Minor cleanups
This commit is contained in:
parent
9125439c3a
commit
6bac405d40
12 changed files with 17 additions and 63 deletions
|
|
@ -5,6 +5,7 @@ import os
|
|||
import shlex
|
||||
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
def run_setup_cmd(prefix, cmd):
|
||||
|
|
@ -61,3 +62,7 @@ def target_concurrency(hook):
|
|||
return multiprocessing.cpu_count()
|
||||
except NotImplementedError:
|
||||
return 1
|
||||
|
||||
|
||||
def run_xargs(hook, cmd, file_args):
|
||||
return xargs(cmd, file_args, target_concurrency=target_concurrency(hook))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue