Preserve blank lines in option help text - #15021
Open
niukanen1 wants to merge 2 commits into
Open
Conversation
niukanen1
marked this pull request as ready for review
September 14, 2026 06:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Option help text already preserves explicit line breaks, but an empty line was
dropped because
textwrap.wrap("")returns no output lines. This collapsedseparate help paragraphs in rendered
pytest --helpoutput.Keep one empty formatted line for each empty input line. The integration
regression registers an option through pytest's
Parserand verifies therendered help output. A formatter-level test also confirms that ordinary
nonempty wrapping is unchanged.
The contributor entry is included in
AUTHORS, together with the numberedchangelog/15021.bugfix.rstentry.Validation:
pytest testing/test_parseopt.py— 35 passed on the current base.tox -e linting— passed on the current base.tox -e py313— 4585 passed, 51 skipped, 15 xfailed, 5 xpassed on basea315b97. The subsequent rebase adds only upstream integration-plugin dependency pins; the code patch is unchanged.