Skip to content

Fix subscript comment placement with parenthesized value#10496

Merged
MichaReiser merged 1 commit intomainfrom
fix-subscript-with-parenthesized-value
Mar 20, 2024
Merged

Fix subscript comment placement with parenthesized value#10496
MichaReiser merged 1 commit intomainfrom
fix-subscript-with-parenthesized-value

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
@github-actions
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
@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.

2 participants