Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support min width not detectable #761

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
+++++++++

1.2.1 (2024-03-28)
==================

- Avoid error when terminal width is undetectable on Python < 3.11
(PR :pr:`761`)

1.2.0 (2024-03-27)
==================
Expand Down
2 changes: 2 additions & 0 deletions src/build/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@


_max_terminal_width = shutil.get_terminal_size().columns - 2
if _max_terminal_width <= 0:
_max_terminal_width = 78

Check warning on line 73 in src/build/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/build/__main__.py#L73

Added line #L73 was not covered by tests


_fill = partial(textwrap.fill, subsequent_indent=' ', width=_max_terminal_width)
Expand Down
Loading