mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ae4ebd5f6b
commit
b888ffdcb1
1 changed files with 3 additions and 3 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
|
||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
@ -148,7 +148,7 @@ def _run_single_hook(
|
||||||
diff_before: bytes,
|
diff_before: bytes,
|
||||||
verbose: bool,
|
verbose: bool,
|
||||||
use_color: bool,
|
use_color: bool,
|
||||||
log_file_path: str | None
|
log_file_path: str | None,
|
||||||
) -> tuple[bool, bytes]:
|
) -> tuple[bool, bytes]:
|
||||||
filenames = classifier.filenames_for_hook(hook)
|
filenames = classifier.filenames_for_hook(hook)
|
||||||
hook_logs = {}
|
hook_logs = {}
|
||||||
|
|
@ -317,7 +317,7 @@ def _run_hooks(
|
||||||
current_retval, prior_diff = _run_single_hook(
|
current_retval, prior_diff = _run_single_hook(
|
||||||
classifier, hook, skips, cols, prior_diff,
|
classifier, hook, skips, cols, prior_diff,
|
||||||
verbose=args.verbose, use_color=args.color,
|
verbose=args.verbose, use_color=args.color,
|
||||||
log_file_path=args.log_file
|
log_file_path=args.log_file,
|
||||||
)
|
)
|
||||||
retval |= current_retval
|
retval |= current_retval
|
||||||
if retval and (config['fail_fast'] or hook.fail_fast):
|
if retval and (config['fail_fast'] or hook.fail_fast):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue