Skip to content

gh-156072: Fix tokenize.untokenize to preserve the original line's whitespace - #156073

Open
kelly-eclipse wants to merge 5 commits into
python:mainfrom
kelly-eclipse:preserve-whitespace
Open

gh-156072: Fix tokenize.untokenize to preserve the original line's whitespace#156073
kelly-eclipse wants to merge 5 commits into
python:mainfrom
kelly-eclipse:preserve-whitespace

Conversation

@kelly-eclipse

@kelly-eclipse kelly-eclipse commented Aug 19, 2026

Copy link
Copy Markdown

Uses the original line (already available via the 5-tuple iterator) to reconstruct the whitespace between tokens in Untokenizer.add_whitespace. Also fixes the ordering of whitespace that precedes a line-continuation.

@python-cla-bot

python-cla-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant