File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed
Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 11from __future__ import unicode_literals
22
3- import os
4- import subprocess
53import sys
64
7- from backports . shutil_get_terminal_size import get_terminal_size
5+ from pyterminalsize import get_terminal_size
86
97from pre_commit import color
108from pre_commit import five
119
1210
13- def _get_cols_from_tput (): # pragma: no cover (fallback)
14- if not os .environ .get ('TERM' ):
15- return 80
16- else :
17- return int (
18- subprocess .Popen (
19- ('tput' , 'cols' ), stdout = subprocess .PIPE ,
20- ).communicate ()[0 ] or
21- # Default in the case of no terminal
22- 80
23- )
24-
25-
26- COLS = get_terminal_size ((0 , 0 )).columns or _get_cols_from_tput ()
11+ COLS = get_terminal_size ((80 , 0 )).columns
2712
2813
2914def get_hook_message (
Original file line number Diff line number Diff line change 4141 install_requires = [
4242 'argparse' ,
4343 'aspy.yaml' ,
44- 'backports.shutil_get_terminal_size' ,
4544 'cached-property' ,
4645 'jsonschema' ,
4746 'nodeenv>=0.11.1' ,
4847 'ordereddict' ,
48+ 'pyterminalsize' ,
4949 'pyyaml' ,
5050 'virtualenv' ,
5151 ],
You can’t perform that action at this time.
0 commit comments