mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-18 11:31:46 +04:00
Added config parameter hide_skipped
This commit is contained in:
parent
b3582dfd31
commit
7c883d038d
7 changed files with 130 additions and 8 deletions
|
|
@ -67,12 +67,21 @@ def get_hook_message(
|
|||
stdout_byte_stream = getattr(sys.stdout, 'buffer', sys.stdout)
|
||||
|
||||
|
||||
def write(s, stream=stdout_byte_stream):
|
||||
def write(s, stream=stdout_byte_stream, cond=True):
|
||||
if not cond:
|
||||
return
|
||||
stream.write(five.to_bytes(s))
|
||||
stream.flush()
|
||||
|
||||
|
||||
def write_line(s=None, stream=stdout_byte_stream, logfile_name=None):
|
||||
def write_line(
|
||||
s=None,
|
||||
stream=stdout_byte_stream,
|
||||
logfile_name=None,
|
||||
cond=True,
|
||||
):
|
||||
if not cond:
|
||||
return
|
||||
output_streams = [stream]
|
||||
if logfile_name:
|
||||
ctx = open(logfile_name, 'ab')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue