mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Allow parallelization of autoupdate
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
This commit is contained in:
parent
5027592625
commit
0911240821
2 changed files with 71 additions and 33 deletions
|
|
@ -229,6 +229,10 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|||
'--repo', dest='repos', action='append', metavar='REPO',
|
||||
help='Only update this repository -- may be specified multiple times.',
|
||||
)
|
||||
autoupdate_parser.add_argument(
|
||||
'-j', type=int, dest='jobs', default=1, metavar='COUNT',
|
||||
help='Parallelization level to use.',
|
||||
)
|
||||
|
||||
_add_cmd('clean', help='Clean out pre-commit files.')
|
||||
|
||||
|
|
@ -372,6 +376,7 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|||
tags_only=not args.bleeding_edge,
|
||||
freeze=args.freeze,
|
||||
repos=args.repos,
|
||||
jobs=args.jobs,
|
||||
)
|
||||
elif args.command == 'clean':
|
||||
return clean(store)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue