Merge pull request #408 from pre-commit/no_pyterminalsize

Use 80 or min width instead of terminal size
This commit is contained in:
Anthony Sottile 2016-10-23 16:48:53 -07:00 committed by GitHub
commit e832ddc57f
4 changed files with 63 additions and 31 deletions

View file

@ -2,15 +2,10 @@ from __future__ import unicode_literals
import sys
from pyterminalsize import get_terminal_size
from pre_commit import color
from pre_commit import five
COLS = get_terminal_size((80, 0)).columns
def get_hook_message(
start,
postfix='',
@ -18,7 +13,7 @@ def get_hook_message(
end_len=0,
end_color=None,
use_color=None,
cols=COLS,
cols=80,
):
"""Prints a message for running a hook.