Skip to content

feat: format tuple assignment targets with split_all_top_level_comma_separated_values - #1330

Open
AAGAM17 wants to merge 1 commit into
google:mainfrom
AAGAM17:feat/split-top-level-commas-outside-brackets
Open

AAGAM17 wants to merge 1 commit into
google:mainfrom
AAGAM17:feat/split-top-level-commas-outside-brackets

Conversation

@AAGAM17

@AAGAM17 AAGAM17 commented Oct 13, 2026

Copy link
Copy Markdown

Fixes #1203. With split_all_top_level_comma_separated_values, a comma outside any brackets (e.g. 'x, = f(...)') forced a split that cannot be made, so yapf left the whole line unformatted. Such commas no longer force a split, so tuple targets format like single targets. Updated the test that expected the unformatted output and added the case from the issue.

@google-cla

google-cla Bot commented Oct 13, 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.

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.

[BUG] yapf with split_all_top_level_comma_separated_values set to true fails to split lines with tuple LHS

1 participant