Skip to content

v0.7.1

@wwood wwood tagged this 02 Sep 03:08
os.get_terminal_size() ioctls stdout's fd directly and raises
OSError: [Errno 25] Inappropriate ioctl for device whenever stdout is not
a terminal, e.g. under CI, when piped, or under pytest capture. This made
printing a subcommand's short help crash in those contexts.

shutil.get_terminal_size() wraps the same call but falls back to the
COLUMNS environment variable or an (80, 24) default instead of raising.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V4g5LxKbzaZNnm74HVfdM9
Assets 2
Loading