Skip to content

Avoid an empty first line when wrapping long help items - #706

Open
GreedyC wants to merge 1 commit into
google:masterfrom
GreedyC:codex/fix-first-item-help-wrapping
Open

GreedyC wants to merge 1 commit into
google:masterfrom
GreedyC:codex/fix-first-item-help-wrapping

Conversation

@GreedyC

@GreedyC GreedyC commented Oct 2, 2026

Copy link
Copy Markdown

Fixes #705.

Do not emit an empty line when WrappedJoin's first item exceeds the available width. Existing wrapping and long tokens are preserved. Adds regression tests for single/multiple items and the availability-line alignment in help text.

Tests: 276 passed on Python 3.9 and 3.12; Python 3.12 was tested both with and without IPython. All changed files pass pylint.

The broader CI-style checks have existing baseline failures: pylint reports one ctypes-constructor diagnostic in formatting_windows.py; ty reports 23 diagnostics in unchanged modules. I reproduced the same diagnostics on clean upstream 716bbc2 with the same environment. This PR does not claim those checks are green.

AI assistance: Codex.

@google-cla

google-cla Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@GreedyC

GreedyC commented Oct 2, 2026

Copy link
Copy Markdown
Author

I signed my cla

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WrappedJoin adds an empty line before an oversized first item

1 participant