Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix subscript comment placement with parenthesized value #10496

Merged
merged 1 commit into from Mar 20, 2024

Conversation

MichaReiser
Copy link
Member

Summary

This is a follow up on #10492

I incorrectly assumed that subscript.value.end() always points past the value. However, this isn't the case for parenthesized values where the end "ends" before the parentheses.

Test Plan

I added new tests for the parenthesized case.

@MichaReiser MichaReiser force-pushed the fix-subscript-with-parenthesized-value branch from 3d16d20 to be5bcee Compare March 20, 2024 19:50
@MichaReiser MichaReiser added internal An internal refactor or improvement formatter Related to the formatter labels Mar 20, 2024
@MichaReiser MichaReiser marked this pull request as ready for review March 20, 2024 19:51
Copy link
Contributor

github-actions bot commented Mar 20, 2024

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser force-pushed the fix-subscript-with-parenthesized-value branch from be5bcee to 475e812 Compare March 20, 2024 20:12
@MichaReiser MichaReiser merged commit 9d705a4 into main Mar 20, 2024
17 checks passed
@MichaReiser MichaReiser deleted the fix-subscript-with-parenthesized-value branch March 20, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants