Skip to content

Commit 6c514bb

Browse files
Merge pull request #40 from georgthegreat/patch-1
Use shutil.get_terminal_size()
2 parents 727a7d6 + 14a142d commit 6c514bb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/commoncode/cliutils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

9+
import shutil
910
import sys
1011

1112
import click
@@ -353,7 +354,7 @@ def file_name_max_len(used_width=BAR_WIDTH + 1 + 7 + 1 + 8 + 1):
353354
The space usage is therefore:
354355
BAR_WIDTH + 1 + 7 + 1 + 8 + 1 + the file name length
355356
"""
356-
term_width, _height = click.get_terminal_size()
357+
term_width, _height = shutil.get_terminal_size()
357358
max_filename_length = term_width - used_width
358359
return max_filename_length
359360

0 commit comments

Comments
 (0)