Skip to content

Commit 185c8fb

Browse files
authored
Merge pull request #1 from clockback/main
Supporting `screen_shape` returned by PyCharm.
2 parents b54a4ff + 03204e7 commit 185c8fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codesurvey/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_pbars(self, *, disable_progress: bool,
8585
cols = 10
8686
screen_shape = _screen_shape_wrapper()
8787
if screen_shape:
88-
cols, _ = screen_shape(sys.stderr)
88+
cols = screen_shape(sys.stderr)[0] or cols
8989

9090
bar_format_with_total = '{desc}: {n_fmt}/{total_fmt} [{elapsed}, {rate_fmt}{postfix}]|{bar}| {percentage:3.0f}% [{remaining} remaining]'
9191
bar_format_without_total = '{desc}: {n_fmt} [{elapsed}, {rate_fmt}{postfix}]'

0 commit comments

Comments
 (0)