mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:10 +00:00
![]() ## Summary Fix an oversight in `find_only_token_in_range` where the following code would panic due do the closing and opening parentheses being in the range we scan: ```python d1 = [ ("a") if # 1 ("b") else # 2 ("c") ] ``` Closing and opening parentheses respectively are now correctly skipped. ## Test Plan I added a regression test |
||
---|---|---|
.. | ||
fixtures |