mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
POC for --dry-run param in run command
This commit is contained in:
parent
2280645d0e
commit
455fc07ad9
10 changed files with 40 additions and 10 deletions
|
|
@ -18,6 +18,7 @@ def run_language(
|
|||
is_local: bool = False,
|
||||
require_serial: bool = True,
|
||||
color: bool = False,
|
||||
dry_run: bool = False
|
||||
) -> tuple[int, bytes]:
|
||||
prefix = Prefix(str(path))
|
||||
version = version or language.get_default_version()
|
||||
|
|
@ -35,6 +36,7 @@ def run_language(
|
|||
is_local=is_local,
|
||||
require_serial=require_serial,
|
||||
color=color,
|
||||
dry_run=dry_run,
|
||||
)
|
||||
out = out.replace(b'\r\n', b'\n')
|
||||
return ret, out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue